fix-expect 0.2.0 → 0.3.0

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: 002511157d852a72d28d172b8306b03595276779
4
- data.tar.gz: afc081ea9d0e7b03b9a06b138c6607b1ad3663e8
3
+ metadata.gz: e92ea2ba021747c69003970b73a9cb06fb79bdc8
4
+ data.tar.gz: aabc739e674a4805046e322074121e6bd966e39c
5
5
  SHA512:
6
- metadata.gz: 63ac5cbf28a0f02c2bf2d31e591bba14133acd8d256582aac5b6e177a2b31dd4e3b4c53a09cdc0c59049c0bb94fa47c99cb9ed6601f43a97ee2a99441134a593
7
- data.tar.gz: ccfdf0da173fc523c8c07c30e11e71f303774f73b4cb1f548b789f654d72099a10430ba34d88bede35e8bfa8427962112a1349df7f2eb0bbe16d606cf030c61b
6
+ metadata.gz: 4616479dc0e99ebb89c9f0e2046e8c367d55219d2f2e6f8a9ec46b0ec5cdbb1db8b0e73c7aeffcbb7bc45b45c4ed600da897c0df3a43cf744593fc6a190d1737
7
+ data.tar.gz: 85bcc305224153f565cabf1d61cc494b62efaa0152ec8afac5fcbdf28cd3e0c727d5e4aeff61d28d00496f0263d820e98905020118b21f70cdcc37d5ff3b6f3d
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -45,20 +45,20 @@ And then execute:
45
45
  __Fix::Expect__ lets you express expected outcomes on an object:
46
46
 
47
47
  ```ruby
48
- expect(value.abs).to Equal: 42 # => MUST Equal: 42
48
+ expect(value.abs).to equal 42 # => MUST equal 42
49
49
  ```
50
50
 
51
51
  Both `expect` and `expect_block` methods are mapped to Spectus's [absolute requirement](https://github.com/fixrb/spectus#absolute-requirement)/[prohibition](https://github.com/fixrb/spectus#absolute-prohibition) to express expectations:
52
52
 
53
53
  ```ruby
54
54
  Fix.describe 6 * 7 do
55
- it { expect_block { subject.class }.to Equal: Fixnum }
56
- it { expect(subject.class).to Equal: Fixnum }
55
+ it { expect_block { subject.class }.to equal Fixnum }
56
+ it { expect(subject.class).to equal Fixnum }
57
57
  end
58
58
 
59
59
  # ..
60
60
  #
61
- # Ran 2 tests in 0.000524 seconds
61
+ # Ran 2 tests in 0.000327 seconds
62
62
  # 100% compliant - 0 infos, 0 failures, 0 errors
63
63
  ```
64
64
 
@@ -68,16 +68,16 @@ Using those methods, the default inherited subject can be overridden by the give
68
68
  Fix.describe -6 * 7 do
69
69
  on :abs do
70
70
  # test against the described front object:
71
- it { MUST_NOT Equal: 1 }
71
+ it { MUST_NOT equal 1 }
72
72
 
73
73
  # another test against -1 object:
74
- it { expect(-1).to Equal: 1 }
74
+ it { expect(-1).to equal 1 }
75
75
  end
76
76
  end
77
77
 
78
78
  # ..
79
79
  #
80
- # Ran 2 tests in 0.000565 seconds
80
+ # Ran 2 tests in 0.000372 seconds
81
81
  # 100% compliant - 0 infos, 0 failures, 0 errors
82
82
  ```
83
83
 
@@ -89,13 +89,13 @@ For convenience, the `is_expected` method is also provided:
89
89
  Fix.describe -6 * 7 do
90
90
  on :abs do
91
91
  # test against the described front object:
92
- it { is_expected.to Equal: 42 }
92
+ it { is_expected.to equal 42 }
93
93
  end
94
94
  end
95
95
 
96
96
  # .
97
97
  #
98
- # Ran 1 tests in 0.000193 seconds
98
+ # Ran 1 tests in 0.000176 seconds
99
99
  # 100% compliant - 0 infos, 0 failures, 0 errors
100
100
  ```
101
101
 
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/fix-expect.gemspec CHANGED
@@ -14,14 +14,14 @@ Gem::Specification.new do |spec|
14
14
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.add_dependency 'fix', '~> 0.15.1'
17
+ spec.add_dependency 'fix', '~> 0.16.0'
18
18
 
19
19
  spec.add_development_dependency 'bundler', '~> 1.10'
20
20
  spec.add_development_dependency 'rake', '~> 10.4'
21
21
  spec.add_development_dependency 'yard', '~> 0.8'
22
22
  spec.add_development_dependency 'simplecov', '~> 0.10'
23
23
  spec.add_development_dependency 'rubocop', '~> 0.34'
24
- spec.add_development_dependency 'spectus', '~> 2.10'
24
+ spec.add_development_dependency 'spectus', '~> 3.0'
25
25
 
26
26
  spec.cert_chain = ['certs/gem-fixrb-public_cert.pem']
27
27
  private_key = File.expand_path('~/.ssh/gem-fixrb-private_key.pem')
data/lib/fix/expect.rb CHANGED
@@ -17,11 +17,11 @@ module Fix
17
17
 
18
18
  # Evaluate to a positive assertion.
19
19
  #
20
- # @param req [Hash, Symbol] The definition of the expected value.
20
+ # @param m [#matches?] The matcher.
21
21
  #
22
22
  # @return (see #requirement)
23
- def to(req)
24
- requirement(req, false).result
23
+ def to(m)
24
+ requirement(m, false).result
25
25
  end
26
26
 
27
27
  # Evaluate to a negative assertion.
@@ -29,8 +29,8 @@ module Fix
29
29
  # @param (see #to)
30
30
  #
31
31
  # @return (see #requirement)
32
- def not_to(req)
33
- requirement(req, true).result
32
+ def not_to(m)
33
+ requirement(m, true).result
34
34
  end
35
35
 
36
36
  # Evaluate to a positive assertion in isolation.
@@ -38,8 +38,8 @@ module Fix
38
38
  # @param (see #to)
39
39
  #
40
40
  # @return (see #requirement)
41
- def to!(req)
42
- requirement(req, false).result(true)
41
+ def to!(m)
42
+ requirement(m, false).result(true)
43
43
  end
44
44
 
45
45
  # Evaluate to a negative assertion in isolation.
@@ -47,21 +47,21 @@ module Fix
47
47
  # @param (see #to)
48
48
  #
49
49
  # @return (see #requirement)
50
- def not_to!(req)
51
- requirement(req, true).result(true)
50
+ def not_to!(m)
51
+ requirement(m, true).result(true)
52
52
  end
53
53
 
54
54
  private
55
55
 
56
56
  # High requirement level.
57
57
  #
58
- # @param req [Hash, Symbol] The definition of the expected value.
59
- # @param negate [Boolean] Evaluate to a negative assertion.
58
+ # @param m [#matches?] The matcher.
59
+ # @param negate [Boolean] Evaluate to a negative assertion.
60
60
  #
61
61
  # @return [Spectus::Result::Fail, Spectus::Result::Pass] Report if the spec
62
62
  # pass or fail.
63
- def requirement(req, negate)
64
- Spectus::RequirementLevel::High.new(req, negate, @object, *@challenges)
63
+ def requirement(m, negate)
64
+ Spectus::RequirementLevel::High.new(m, negate, @object, *@challenges)
65
65
  end
66
66
  end
67
67
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix-expect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Wack
@@ -30,7 +30,7 @@ cert_chain:
30
30
  dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
31
31
  0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
32
32
  -----END CERTIFICATE-----
33
- date: 2015-10-24 00:00:00.000000000 Z
33
+ date: 2015-10-31 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: fix
@@ -38,14 +38,14 @@ dependencies:
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.15.1
41
+ version: 0.16.0
42
42
  type: :runtime
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 0.15.1
48
+ version: 0.16.0
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: bundler
51
51
  requirement: !ruby/object:Gem::Requirement
@@ -122,14 +122,14 @@ dependencies:
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: '2.10'
125
+ version: '3.0'
126
126
  type: :development
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '2.10'
132
+ version: '3.0'
133
133
  description: Fix extension gem to provide the expect syntax.
134
134
  email:
135
135
  - contact@cyril.email
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.4.5.1
176
+ rubygems_version: 2.4.5
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Provides the expect syntax.
metadata.gz.sig CHANGED
Binary file