rspec-expectations 3.8.3 → 3.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +7 -2
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers/built_in/be_instance_of.rb +5 -11
- data/lib/rspec/matchers/built_in/be_kind_of.rb +5 -13
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3287d393bfe1d8bb47a19be373b09d965c86541f96844a6ee20666eac8e3b22
|
4
|
+
data.tar.gz: 498320228bbe272e0b1c41e86f15b3c434e418c0c3d1f5afcb3630e6f450cdaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc82b0fde107519cd587adc48435e9cdd11d563bae144a4a45ac78b625eb0ea36bad76a7c0d7cfb4514d81d78f9029087b76ef4a89cd208f0610c53ee0a887e4
|
7
|
+
data.tar.gz: 2b5c42079a2f100d9ce9b0e6046b392350df1064977d4a56c78696459deecd279ab85a3b9d5b392828d60b44ba0aad1de9ee320c5bcb040d4bcf7bd079756c5f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
-
###
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.3...
|
1
|
+
### 3.8.4 / 2019-06-10
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.3...v3.8.4)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Prevent false negatives when checking objects for the methods required to run the
|
7
|
+
the `be_an_instance_of` and `be_kind_of` matchers. (Nazar Matus, #1112)
|
3
8
|
|
4
9
|
### 3.8.3 / 2019-04-20
|
5
10
|
[Full Changelog](http://github.com/rspec/rspec-expectations/compare/v3.8.2...v3.8.3)
|
@@ -14,17 +14,11 @@ module RSpec
|
|
14
14
|
private
|
15
15
|
|
16
16
|
def match(expected, actual)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
"but it does not respond to the method."
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def actual_object_respond_to?(actual, method)
|
27
|
-
::Kernel.instance_method(:respond_to?).bind(actual).call(method)
|
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."
|
28
22
|
end
|
29
23
|
end
|
30
24
|
end
|
@@ -8,19 +8,11 @@ module RSpec
|
|
8
8
|
private
|
9
9
|
|
10
10
|
def match(expected, actual)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
raise ::ArgumentError, "The #{matcher_name} matcher requires that " \
|
17
|
-
"the actual object responds to either #kind_of? or #is_a? methods "\
|
18
|
-
"but it responds to neigher of two methods."
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def actual_object_respond_to?(actual, method)
|
23
|
-
::Kernel.instance_method(:respond_to?).bind(actual).call(method)
|
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."
|
24
16
|
end
|
25
17
|
end
|
26
18
|
end
|
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.4
|
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: 2019-
|
48
|
+
date: 2019-06-10 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -202,7 +202,7 @@ licenses:
|
|
202
202
|
- MIT
|
203
203
|
metadata:
|
204
204
|
bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
|
205
|
-
changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.8.
|
205
|
+
changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.8.4/Changelog.md
|
206
206
|
documentation_uri: https://rspec.info/documentation/
|
207
207
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
208
208
|
source_code_uri: https://github.com/rspec/rspec-expectations
|
@@ -225,5 +225,5 @@ requirements: []
|
|
225
225
|
rubygems_version: 3.0.3
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
|
-
summary: rspec-expectations-3.8.
|
228
|
+
summary: rspec-expectations-3.8.4
|
229
229
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|