gusto 1.0.0.beta13 → 1.0.0.beta14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 868ae742b7d3dbffe9588ff8e8ed78c5af37a12e
4
- data.tar.gz: 788fba857fb9b8a79975f939b96f075d5bfec6e9
3
+ metadata.gz: aca9cea8b1abeda163c9bf46333ccb2ae2a3bd4c
4
+ data.tar.gz: 31e50947ce1983c5dcb37355c1fddf4245a7b39f
5
5
  SHA512:
6
- metadata.gz: dc506a784e813697c07bd1fafaa686ad4fa37b11edbcb313d3f46588e4fea1d3723b9e6621e59a3a1cbf993d84fa1b8307f337580f722dcdce66dae4106a8f2d
7
- data.tar.gz: 12adf4e03d13af881b018881065b852fe5a487ab05d5b79ad3ecf507d268eef48500cb281720c112f30ed4441ffc3a6ca63dac912ccd260fa1e78873f8118af1
6
+ metadata.gz: 5e8e7fe4ee8f830f4922d3f086a6bbc1cec598ee771078d095c4aee1134dae6a8589484d3df9b47d96dd82fc284ca94820a7386f4673b5c04f2de54c73b08c10
7
+ data.tar.gz: 60f8921a10e52f2e2e1d3bb7d7abea11139ec1dc3dcab2f402c0459a51d6919d9c72c1fbbe29fe961702a4ca6ba05c5ed874f46197079b53873b43fcf6eaf1de
data/lib/Spec/DSL.coffee CHANGED
@@ -20,12 +20,12 @@ window.Spec.DSL = DSL =
20
20
  # matcher function
21
21
  to: (matcher) ->
22
22
  match = matcher(object)
23
- throw new Spec.ExpectationError("expected #{match.description}") unless match.result
23
+ throw new Spec.ExpectationError("expected #{match.description()}") unless match.result
24
24
 
25
25
  # Specifies that the object should receive a negative response
26
26
  notTo: (matcher) ->
27
27
  match = matcher(object)
28
- throw new Spec.ExpectationError("expected not #{match.description}") if match.result
28
+ throw new Spec.ExpectationError("expected not #{match.description()}") if match.result
29
29
 
30
30
  # Sets up a stub on the given method, with a delayed expectation that this
31
31
  # stub method be called
@@ -5,7 +5,7 @@ window.Spec.Matchers =
5
5
  be: (expected) ->
6
6
  (value) ->
7
7
  result: value is expected
8
- description: "be #{Spec.Util.inspect expected}, actual #{Spec.Util.inspect value}"
8
+ description: -> "be #{Spec.Util.inspect expected}, actual #{Spec.Util.inspect value}"
9
9
 
10
10
  # Tests that value type matches specified class
11
11
  beA: (klass) ->
@@ -21,7 +21,7 @@ window.Spec.Matchers =
21
21
  equal: (expected) ->
22
22
  (value) ->
23
23
  result: String(value) == String(expected)
24
- description: "equal “#{String expected}”, actual “#{String value}” – #{$.trim diffString(String(value), String(expected))}"
24
+ description: -> "equal “#{String expected}”, actual “#{String value}” – #{$.trim diffString(String(value), String(expected))}"
25
25
 
26
26
  # All-purpose inclusion matcher
27
27
  include: (expected) ->
@@ -31,7 +31,7 @@ window.Spec.Matchers =
31
31
  for test in expected
32
32
  match = false unless (value.indexOf && value.indexOf(test) >= 0) || value[test]?
33
33
  result: match
34
- description: "include #{Spec.Util.inspect expected}, actual #{Spec.Util.inspect value}"
34
+ description: -> "include #{Spec.Util.inspect expected}, actual #{Spec.Util.inspect value}"
35
35
  else if typeof expected == 'object'
36
36
  (value) ->
37
37
  missing = {}
@@ -42,7 +42,7 @@ window.Spec.Matchers =
42
42
  match = false
43
43
  missing[test] = expected[test]
44
44
  result: match
45
- description: "include #{Spec.Util.inspect expected}, actual #{Spec.Util.inspect value}, missing #{Spec.Util.inspect missing}"
45
+ description: -> "include #{Spec.Util.inspect expected}, actual #{Spec.Util.inspect value}, missing #{Spec.Util.inspect missing}"
46
46
  else
47
47
  include([expected])
48
48
 
@@ -56,10 +56,10 @@ window.Spec.Matchers =
56
56
  thrown = e.message
57
57
  if thrown
58
58
  result: thrown == message
59
- description: "throw an error with message “#{String thrown}”, actual message “#{String message}” – #{$.trim diffString(String(thrown), String(message))}"
59
+ description: -> "throw an error with message “#{String thrown}”, actual message “#{String message}” – #{$.trim diffString(String(thrown), String(message))}"
60
60
  else
61
61
  result: false
62
- description: "throw an error with message “#{message}”, no error thrown"
62
+ description: -> "throw an error with message “#{message}”, no error thrown"
63
63
 
64
64
  # Tests a value type using typeof, falling back to instanceof if type is an object
65
65
  _haveType: (type, klass) ->
@@ -68,12 +68,12 @@ window.Spec.Matchers =
68
68
  @_beAnInstanceOf(klass)(value)
69
69
  else
70
70
  result: typeof value is type
71
- description: "to have type “#{type}”, actual “#{typeof value}”"
71
+ description: -> "to have type “#{type}”, actual “#{typeof value}”"
72
72
 
73
73
  # Tests if matched value is an instance of class
74
74
  _beAnInstanceOf: (klass) ->
75
75
  (value) ->
76
76
  result: value instanceof klass
77
- description: "#{value} to be an instance of “#{klass.name || klass}”, actually “#{Spec.Util.inspectClass value}"
77
+ description: -> "#{value} to be an instance of “#{klass.name || klass}”, actually “#{Spec.Util.inspectClass value}"
78
78
 
79
79
  window.Spec.Matchers.beAn = window.Spec.Matchers.beA
data/lib/gusto/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gusto
2
- VERSION = "1.0.0.beta13"
2
+ VERSION = "1.0.0.beta14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gusto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta13
4
+ version: 1.0.0.beta14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Cohen