rspec-mocks 3.10.2 → 3.10.3
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/Changelog.md +10 -1
- data/lib/rspec/mocks/argument_list_matcher.rb +17 -3
- data/lib/rspec/mocks/matchers/receive.rb +1 -0
- data/lib/rspec/mocks/message_expectation.rb +2 -1
- data/lib/rspec/mocks/verifying_double.rb +2 -10
- data/lib/rspec/mocks/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +9 -9
- 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: a4977129849498908e5c8b2ca7cf93d16884a08ab6dd5511558e80a17ca59343
|
4
|
+
data.tar.gz: e97a221ae0a1a0b79b809454095a0c0d4cef3048b4b17408d1c4f1e11efad075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50d2119f48c3f066738682dec9ce64f7287204d620eb081bb6079b246e68219a0cf0dc3b9cfe0ca2681da097a8c6bbfc8827f55e29f2f584de741adb837814bd
|
7
|
+
data.tar.gz: 39a62e9a35234b6021eff74dad5cb535e3b56b64060e8ea342ac38d8cfb24764d4971e52b47fa6c6963fcd2f6463231683fe54af4119f1389a98e20b9215286b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
### Development
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.3...3-10-maintenance)
|
3
|
+
|
4
|
+
### 3.10.3 / 2021-01-28
|
5
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.2...v3.10.3)
|
6
|
+
|
7
|
+
Bug Fixes:
|
8
|
+
|
9
|
+
* Suppress warning by setting `$VERBOSE` to nil. (Nobuyoshi Nakada, #1414)
|
10
|
+
* Support keyword argument semantics when constraining argument expectations using
|
11
|
+
`with` on Ruby 3.0+ (Yusuke Endoh, #1394)
|
3
12
|
|
4
13
|
### 3.10.2 / 2021-01-27
|
5
14
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.10.1...v3.10.2)
|
@@ -46,16 +46,30 @@ module RSpec
|
|
46
46
|
@expected_args = expected_args
|
47
47
|
ensure_expected_args_valid!
|
48
48
|
end
|
49
|
+
ruby2_keywords :initialize if Module.private_method_defined?(:ruby2_keywords)
|
49
50
|
|
50
51
|
# @api public
|
51
|
-
# @param [Array]
|
52
|
+
# @param [Array] actual_args
|
52
53
|
#
|
53
54
|
# Matches each element in the `expected_args` against the element in the same
|
54
55
|
# position of the arguments passed to `new`.
|
55
56
|
#
|
56
57
|
# @see #initialize
|
57
|
-
def args_match?(*
|
58
|
-
|
58
|
+
def args_match?(*actual_args)
|
59
|
+
expected_args = resolve_expected_args_based_on(actual_args)
|
60
|
+
|
61
|
+
return false if expected_args.size != actual_args.size
|
62
|
+
|
63
|
+
if RUBY_VERSION >= "3"
|
64
|
+
# if both arguments end with Hashes, and if one is a keyword hash and the other is not, they don't match
|
65
|
+
if Hash === expected_args.last && Hash === actual_args.last
|
66
|
+
if !Hash.ruby2_keywords_hash?(actual_args.last) && Hash.ruby2_keywords_hash?(expected_args.last)
|
67
|
+
return false
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
Support::FuzzyMatcher.values_match?(expected_args, actual_args)
|
59
73
|
end
|
60
74
|
|
61
75
|
# @private
|
@@ -53,7 +53,7 @@ module RSpec
|
|
53
53
|
# etc.
|
54
54
|
#
|
55
55
|
# If the message is received more times than there are values, the last
|
56
|
-
# value is
|
56
|
+
# value is returned for every subsequent call.
|
57
57
|
#
|
58
58
|
# @return [nil] No further chaining is supported after this.
|
59
59
|
# @example
|
@@ -322,6 +322,7 @@ module RSpec
|
|
322
322
|
@argument_list_matcher = ArgumentListMatcher.new(*args)
|
323
323
|
self
|
324
324
|
end
|
325
|
+
ruby2_keywords(:with) if Module.private_method_defined?(:ruby2_keywords)
|
325
326
|
|
326
327
|
# Expect messages to be received in a specific order.
|
327
328
|
#
|
@@ -34,23 +34,15 @@ module RSpec
|
|
34
34
|
super
|
35
35
|
end
|
36
36
|
|
37
|
-
# @private
|
38
|
-
module SilentIO
|
39
|
-
def self.method_missing(*); end
|
40
|
-
def self.respond_to?(*)
|
41
|
-
true
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
37
|
# Redefining `__send__` causes ruby to issue a warning.
|
46
|
-
old, $
|
38
|
+
old, $VERBOSE = $VERBOSE, nil
|
47
39
|
def __send__(name, *args, &block)
|
48
40
|
@__sending_message = name
|
49
41
|
super
|
50
42
|
ensure
|
51
43
|
@__sending_message = nil
|
52
44
|
end
|
53
|
-
$
|
45
|
+
$VERBOSE = old
|
54
46
|
|
55
47
|
def send(name, *args, &block)
|
56
48
|
__send__(name, *args, &block)
|
data/lib/rspec/mocks/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-mocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.3
|
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: 2022-01-28 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -99,16 +99,16 @@ dependencies:
|
|
99
99
|
name: cucumber
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 1.3
|
104
|
+
version: '1.3'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 1.3
|
111
|
+
version: '1.3'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: aruba
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,7 +194,7 @@ licenses:
|
|
194
194
|
- MIT
|
195
195
|
metadata:
|
196
196
|
bug_tracker_uri: https://github.com/rspec/rspec-mocks/issues
|
197
|
-
changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.10.
|
197
|
+
changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.10.3/Changelog.md
|
198
198
|
documentation_uri: https://rspec.info/documentation/
|
199
199
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
200
200
|
source_code_uri: https://github.com/rspec/rspec-mocks
|
@@ -214,8 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
- !ruby/object:Gem::Version
|
215
215
|
version: '0'
|
216
216
|
requirements: []
|
217
|
-
rubygems_version: 3.
|
217
|
+
rubygems_version: 3.3.3
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
|
-
summary: rspec-mocks-3.10.
|
220
|
+
summary: rspec-mocks-3.10.3
|
221
221
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|