expect 0.0.8 → 0.0.9

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: d76a714370d9df24d69b4d605113242f3476ad90
4
- data.tar.gz: a73b57267d81f11f3a1e3f89d44b10b28d8ef016
3
+ metadata.gz: 7390ce50fc4637aebceecbab541c3fc6d4625a46
4
+ data.tar.gz: 8e3b891f69b01d01354bf3550ac4d5ef63f618d7
5
5
  SHA512:
6
- metadata.gz: c5cfa563bf4a74408c0f8d0fdc9257e8ef448e3c8664dda72ba483edee21252f3e9826f480a4120bf238b5803b05d56b0be97ff8dc10022d131abd1d2c01d84a
7
- data.tar.gz: 16fa5f90f9b16a0a1dd5dddefc422a42294b1616ce6c51cdb520fd28b853b03fd8f9c45dc843bc619d7f31eb4cd9466b4d44d9d159c1377d065a921d6baa10e2
6
+ metadata.gz: ea5940e683012a0972f82aef6e124d79bfb890cfdffeddacc861888ba048bf8415b74f78138b4942d0b6bebcb740155e1c29d3d23dceb6248afebe6ef6607e44
7
+ data.tar.gz: dff2a2e61bfbc4af5ec08a903283a975cdf4c475def48126a5db23a1527da4be472aefe1bbad4aeb4d861afd75cf99901bace01ea960ef2ef10b5a7e71dfa56e
data/README.md CHANGED
@@ -41,25 +41,25 @@ Or install it yourself as:
41
41
  **Equivalence** expectation:
42
42
 
43
43
  ```ruby
44
- Expect.this { 'foo' }.not_to eql: 'bar' # => true
44
+ Expect.this { 'foo' }.not_to Eql: 'bar' # => true
45
45
  ```
46
46
 
47
47
  **Identity** expectation:
48
48
 
49
49
  ```ruby
50
- Expect.this { :foo }.to equal: :foo # => true
50
+ Expect.this { :foo }.to Equal: :foo # => true
51
51
  ```
52
52
 
53
53
  **Regular expressions** expectation:
54
54
 
55
55
  ```ruby
56
- Expect.this { 'foo' }.to match: /^foo$/ # => true
56
+ Expect.this { 'foo' }.to Match: /^foo$/ # => true
57
57
  ```
58
58
 
59
59
  **Expecting errors** expectation:
60
60
 
61
61
  ```ruby
62
- Expect.this { Boom }.to raise_exception: NameError # => true
62
+ Expect.this { Boom }.to RaiseException: NameError # => true
63
63
  ```
64
64
 
65
65
  ## Versioning
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
@@ -5,14 +5,14 @@ require_relative File.join 'expect', 'expectation_target'
5
5
  # @api public
6
6
  #
7
7
  # @example Expect 42 to be equal to 42
8
- # Expect.this { 42 }.to equal: 42 # => true
8
+ # Expect.this { 42 }.to Equal: 42 # => true
9
9
  module Expect
10
10
  # Expectations are built with this method.
11
11
  #
12
12
  # @api public
13
13
  #
14
14
  # @example Identity expectation
15
- # this { 42 }.to equal: 42 # => true
15
+ # this { 42 }.to Equal: 42 # => true
16
16
  #
17
17
  # @return [ExpectationTarget] the expectation target.
18
18
  def self.this(&input)
@@ -7,7 +7,7 @@ module Expect
7
7
  # @api private
8
8
  #
9
9
  # @example
10
- # ExpectationTarget.new { 42 }.to equal: 42 # => true
10
+ # ExpectationTarget.new { 42 }.to Equal: 42 # => true
11
11
  class ExpectationTarget
12
12
  # Create a new expection target
13
13
  #
@@ -10,8 +10,7 @@ module Expect
10
10
  # @return [Boolean] report if the expectation is true or false
11
11
  def self.pass?(definition, &actual)
12
12
  params = Array(definition).flatten(1)
13
- name = params.first.to_s.split('_').map(&:capitalize).join.to_sym
14
- matcher = Matchi.fetch(name, *params[1..-1])
13
+ matcher = Matchi.fetch(params.first, *params[1..-1])
15
14
 
16
15
  matcher.matches?(&actual)
17
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: matchi