rspec-expectations 3.8.1 → 3.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +46 -0
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers.rb +3 -3
- data/lib/rspec/matchers/built_in/all.rb +1 -0
- data/lib/rspec/matchers/built_in/be_instance_of.rb +5 -1
- data/lib/rspec/matchers/built_in/be_kind_of.rb +5 -1
- data/lib/rspec/matchers/built_in/change.rb +4 -2
- data/lib/rspec/matchers/built_in/include.rb +1 -1
- metadata +13 -23
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d1f0c43e7a6933605f4b96eb0a5545bd5e1b03a2b2de4471edada5000f3c5c37
|
4
|
+
data.tar.gz: 62b85e7625d066114174dfaa586dbb2cb419aa0bc470b68918c2524b841f8762
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ba237ec4317b7af0780f5e929e10da26b501f76a23cb807684498a21118ef0f72598c1ded7ee0436a8a29f97ea16a0d4f887c7b345b22302f5b8ef50c660beb
|
7
|
+
data.tar.gz: 4138b8b208b668216660d55f5634440e8240c4a36f15489fc3e1e6093d4a8530fc419d9f958ea4526ac63e7e9e2d589c7716a21832d257adac823486d5dfae77
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,49 @@
|
|
1
|
+
### 3.8.6 / 2019-10-07
|
2
|
+
|
3
|
+
Bug Fixes:
|
4
|
+
|
5
|
+
* Revert #1125 due to the change being incompatible with our semantic versioning
|
6
|
+
policy.
|
7
|
+
|
8
|
+
### 3.8.5 / 2019-10-02
|
9
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.4...v3.8.5)
|
10
|
+
|
11
|
+
Bug Fixes:
|
12
|
+
|
13
|
+
* Prevent unsupported implicit block expectation syntax from being used.
|
14
|
+
(Phil Pirozhkov, #1125)
|
15
|
+
|
16
|
+
### 3.8.4 / 2019-06-10
|
17
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.3...v3.8.4)
|
18
|
+
|
19
|
+
Bug Fixes:
|
20
|
+
|
21
|
+
* Prevent false negatives when checking objects for the methods required to run the
|
22
|
+
the `be_an_instance_of` and `be_kind_of` matchers. (Nazar Matus, #1112)
|
23
|
+
|
24
|
+
### 3.8.3 / 2019-04-20
|
25
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.2...v3.8.3)
|
26
|
+
|
27
|
+
Bug Fixes:
|
28
|
+
|
29
|
+
* Prevent composed `all` matchers from leaking into their siblings leading to duplicate
|
30
|
+
failures. (Jamie English, #1086)
|
31
|
+
* Prevent objects which change their hash on comparison from failing change checks.
|
32
|
+
(Phil Pirozhkov, #1110)
|
33
|
+
* Issue an `ArgumentError` rather than a `NoMethodError` when `be_an_instance_of` and
|
34
|
+
`be_kind_of` matchers encounter objects not supporting those methods.
|
35
|
+
(Taichi Ishitani, #1107)
|
36
|
+
|
37
|
+
### 3.8.2 / 2018-10-09
|
38
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.1...v3.8.2)
|
39
|
+
|
40
|
+
Bug Fixes:
|
41
|
+
|
42
|
+
* Change `include` matcher to rely on a `respond_to?(:include?)` check rather than a direct
|
43
|
+
Hash comparison before calling `to_hash` to convert to a hash. (Jordan Owens, #1073)
|
44
|
+
* Prevent unexpected call stack jumps from causing an obscure error (`IndexError`), and
|
45
|
+
replace that error with a proper informative message. (Jon Rowe, #1076)
|
46
|
+
|
1
47
|
### 3.8.1 / 2018-08-06
|
2
48
|
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.0...v3.8.1)
|
3
49
|
|
data/lib/rspec/matchers.rb
CHANGED
@@ -266,9 +266,9 @@ module RSpec
|
|
266
266
|
# @example
|
267
267
|
# expect(actual).to eq(expected)
|
268
268
|
# expect(actual).not_to eq(expected)
|
269
|
-
# @return [ExpectationTarget]
|
270
|
-
# @see ExpectationTarget#to
|
271
|
-
# @see ExpectationTarget#not_to
|
269
|
+
# @return [Expectations::ExpectationTarget]
|
270
|
+
# @see Expectations::ExpectationTarget#to
|
271
|
+
# @see Expectations::ExpectationTarget#not_to
|
272
272
|
|
273
273
|
# Allows multiple expectations in the provided block to fail, and then
|
274
274
|
# aggregates them into a single exception, rather than aborting on the
|
@@ -14,7 +14,11 @@ module RSpec
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def match(expected, actual)
|
17
|
-
actual.instance_of?
|
17
|
+
actual.instance_of?(expected)
|
18
|
+
rescue NoMethodError
|
19
|
+
raise ::ArgumentError, "The #{matcher_name} matcher requires that " \
|
20
|
+
"the actual object responds to #instance_of? method " \
|
21
|
+
"but a `NoMethodError` was encountered instead."
|
18
22
|
end
|
19
23
|
end
|
20
24
|
end
|
@@ -8,7 +8,11 @@ module RSpec
|
|
8
8
|
private
|
9
9
|
|
10
10
|
def match(expected, actual)
|
11
|
-
actual.kind_of?
|
11
|
+
actual.kind_of?(expected)
|
12
|
+
rescue NoMethodError
|
13
|
+
raise ::ArgumentError, "The #{matcher_name} matcher requires that " \
|
14
|
+
"the actual object responds to #kind_of? method " \
|
15
|
+
"but a `NoMethodError` was encountered instead."
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
@@ -373,6 +373,7 @@ module RSpec
|
|
373
373
|
event_proc.call
|
374
374
|
|
375
375
|
@actual_after = evaluate_value_proc
|
376
|
+
@actual_hash = @actual_after.hash
|
376
377
|
true
|
377
378
|
end
|
378
379
|
|
@@ -387,8 +388,9 @@ module RSpec
|
|
387
388
|
#
|
388
389
|
# Note that it is not sufficient to only check the hashes; it is
|
389
390
|
# possible for two values to be unequal (and of different classes)
|
390
|
-
# but to return the same hash value.
|
391
|
-
|
391
|
+
# but to return the same hash value. Also, some objects may change
|
392
|
+
# their hash after being compared with `==`/`!=`.
|
393
|
+
@actual_before != @actual_after || @before_hash != @actual_hash
|
392
394
|
end
|
393
395
|
|
394
396
|
def actual_delta
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-expectations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -45,7 +45,7 @@ cert_chain:
|
|
45
45
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
46
46
|
F3MdtaDehhjC
|
47
47
|
-----END CERTIFICATE-----
|
48
|
-
date:
|
48
|
+
date: 2019-10-07 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -82,19 +82,19 @@ dependencies:
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '2.0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
85
|
+
name: aruba
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 0.14.10
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: 0.14.10
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: cucumber
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,20 +109,6 @@ dependencies:
|
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '1.3'
|
112
|
-
- !ruby/object:Gem::Dependency
|
113
|
-
name: aruba
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
115
|
-
requirements:
|
116
|
-
- - "~>"
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: 0.6.2
|
119
|
-
type: :development
|
120
|
-
prerelease: false
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
requirements:
|
123
|
-
- - "~>"
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: 0.6.2
|
126
112
|
- !ruby/object:Gem::Dependency
|
127
113
|
name: minitest
|
128
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,7 +186,12 @@ files:
|
|
200
186
|
homepage: https://github.com/rspec/rspec-expectations
|
201
187
|
licenses:
|
202
188
|
- MIT
|
203
|
-
metadata:
|
189
|
+
metadata:
|
190
|
+
bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
|
191
|
+
changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.8.6/Changelog.md
|
192
|
+
documentation_uri: https://rspec.info/documentation/
|
193
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
194
|
+
source_code_uri: https://github.com/rspec/rspec-expectations
|
204
195
|
post_install_message:
|
205
196
|
rdoc_options:
|
206
197
|
- "--charset=UTF-8"
|
@@ -217,9 +208,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
208
|
- !ruby/object:Gem::Version
|
218
209
|
version: '0'
|
219
210
|
requirements: []
|
220
|
-
|
221
|
-
rubygems_version: 2.6.13
|
211
|
+
rubygems_version: 3.0.6
|
222
212
|
signing_key:
|
223
213
|
specification_version: 4
|
224
|
-
summary: rspec-expectations-3.8.
|
214
|
+
summary: rspec-expectations-3.8.6
|
225
215
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|