rspec-mocks 3.11.1 → 3.11.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Changelog.md +12 -1
- data/lib/rspec/mocks/message_expectation.rb +0 -2
- data/lib/rspec/mocks/method_reference.rb +14 -2
- data/lib/rspec/mocks/verifying_message_expectation.rb +1 -0
- data/lib/rspec/mocks/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +5 -5
- 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: 4c3dc1584caef34a4124fa5ca6add46de607d0a74718463309417093bd2c1291
|
4
|
+
data.tar.gz: 63740bfcd05bc3d8b3005d7c1856c22f50adadbcb8ed02c92287669068474407
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 730afc91e3183e562e0c637dde6913e3fc54b689d74a330fb9dbed0348a9d1faa77df5bf1b3afb51aecc456e9f9cf967d8e90f67e277c55ca4605bf57ededfa0
|
7
|
+
data.tar.gz: 0aa402d85c334925fe2f2202c0843f74ca4c9a0ffd08c295838e3bdf9ef12f1c33da4ac9a2b55ae60584952e9e85b63a2f723ee86e5003a291f35d43532bc375
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
### Development
|
2
|
-
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.2...3-11-maintenance)
|
3
|
+
|
4
|
+
### 3.11.2 / 2022-10-25
|
5
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.1...3.11.2)
|
6
|
+
|
7
|
+
Bug Fixes:
|
8
|
+
|
9
|
+
* Use the original implementation of `Class.new` to detect overridden definitions
|
10
|
+
of `new` rather than the owner, fixing detection of "double aliased" methods
|
11
|
+
in Ruby 3 and above. (Benoit Daloze, #1470, #1476)
|
12
|
+
* Support keyword argument semantics when constraining argument expectations using
|
13
|
+
`with` on Ruby 3.0+ with `instance_double` (Andrii Malyshko, #1473)
|
3
14
|
|
4
15
|
### 3.11.1 / 2022-03-31
|
5
16
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.11.0...v3.11.1)
|
@@ -406,7 +406,6 @@ module RSpec
|
|
406
406
|
# some collaborators it delegates to for this stuff but for now this was
|
407
407
|
# the simplest way to split the public from private stuff to make it
|
408
408
|
# easier to publish the docs for the APIs we want published.
|
409
|
-
# rubocop:disable Metrics/ModuleLength
|
410
409
|
module ImplementationDetails
|
411
410
|
attr_accessor :error_generator, :implementation
|
412
411
|
attr_reader :message
|
@@ -686,7 +685,6 @@ module RSpec
|
|
686
685
|
nil
|
687
686
|
end
|
688
687
|
end
|
689
|
-
# rubocop:enable Metrics/ModuleLength
|
690
688
|
|
691
689
|
include ImplementationDetails
|
692
690
|
end
|
@@ -185,11 +185,23 @@ module RSpec
|
|
185
185
|
def self.applies_to?(method_name)
|
186
186
|
return false unless method_name == :new
|
187
187
|
klass = yield
|
188
|
-
return false unless klass.respond_to?(:new, true)
|
188
|
+
return false unless ::Class === klass && klass.respond_to?(:new, true)
|
189
189
|
|
190
190
|
# We only want to apply our special logic to normal `new` methods.
|
191
191
|
# Methods that the user has monkeyed with should be left as-is.
|
192
|
-
|
192
|
+
uses_class_new?(klass)
|
193
|
+
end
|
194
|
+
|
195
|
+
if RUBY_VERSION.to_i >= 3
|
196
|
+
CLASS_NEW = ::Class.instance_method(:new)
|
197
|
+
|
198
|
+
def self.uses_class_new?(klass)
|
199
|
+
::RSpec::Support.method_handle_for(klass, :new) == CLASS_NEW.bind(klass)
|
200
|
+
end
|
201
|
+
else # Ruby 2's Method#== is too strict
|
202
|
+
def self.uses_class_new?(klass)
|
203
|
+
::RSpec::Support.method_handle_for(klass, :new).owner == ::Class
|
204
|
+
end
|
193
205
|
end
|
194
206
|
|
195
207
|
def with_signature
|
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.11.
|
4
|
+
version: 3.11.2
|
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: 2022-
|
48
|
+
date: 2022-10-25 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -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.11.
|
197
|
+
changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.11.2/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.2.3
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
|
-
summary: rspec-mocks-3.11.
|
220
|
+
summary: rspec-mocks-3.11.2
|
221
221
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|