rspec-mocks 3.13.3 → 3.13.5
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 +22 -2
- data/lib/rspec/mocks/message_expectation.rb +19 -9
- data/lib/rspec/mocks/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +9 -8
- 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: 1ec56fe2f767262115b40aed338c0efccd4aa244cb5ce913e411a9952ec361fe
|
4
|
+
data.tar.gz: 744db38397a2f425482391df2f6a230396a4d67bbf52f42c383d57862d8415b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2813849f49563f48798d2e84f0139875eb1840d79ca6f295b30182d7c501047c2ab33463fb93f3eca31b31b6e861d8497b810a632fbb1461f63caf5ed338903d
|
7
|
+
data.tar.gz: f3ab9c0db0a688dce4ae84e4e2ed8f31980bcbec6bb98acc9889bcf6ac3d4e1707e6146b22e4889a348aba4ec602f97e9f1342967154ee452ea4a0f41ea008bd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,7 +1,27 @@
|
|
1
1
|
### Development
|
2
|
-
[Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.
|
2
|
+
[Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.5...3-13-maintenance)
|
3
3
|
|
4
|
-
|
4
|
+
### 3.13.5 / 2025-05-27
|
5
|
+
[Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.4...rspec-mocks-v3.13.5)
|
6
|
+
|
7
|
+
Bug Fixes:
|
8
|
+
|
9
|
+
* Fix regression where a previous fix (rspec/rspec#214) would leave behind thread data
|
10
|
+
between tests. (Jon Rowe, rspec/rspec#219)
|
11
|
+
* Fix links in gemspec to point to monorepo / homepage. (Jon Rowe)
|
12
|
+
|
13
|
+
### 3.13.4 / 2025-05-05
|
14
|
+
[Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.3...rspec-mocks-v3.13.4)
|
15
|
+
|
16
|
+
Bug Fixes:
|
17
|
+
|
18
|
+
* Fix regression where nested stubbed method calls would inadvertently not be counted.
|
19
|
+
(Jon Rowe, rspec/rspec#214)
|
20
|
+
* Fix regression where keyword arguments would not be passed through to nested stubbed
|
21
|
+
method calls. (Jon Rowe, rspec/rspec#214)
|
22
|
+
|
23
|
+
### 3.13.3 / 2025-05-01
|
24
|
+
[Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.2...rspec-mocks-v3.13.3)
|
5
25
|
|
6
26
|
Bug Fixes:
|
7
27
|
|
@@ -439,7 +439,7 @@ module RSpec
|
|
439
439
|
@ordered = false
|
440
440
|
@at_least = @at_most = @exactly = nil
|
441
441
|
|
442
|
-
self.
|
442
|
+
self.invoking_internals = false
|
443
443
|
|
444
444
|
# Initialized to nil so that we don't allocate an array for every
|
445
445
|
# mock or stub. See also comment in `and_yield`.
|
@@ -476,7 +476,7 @@ module RSpec
|
|
476
476
|
ruby2_keywords :safe_invoke if respond_to?(:ruby2_keywords, true)
|
477
477
|
|
478
478
|
def invoke(parent_stub, *args, &block)
|
479
|
-
if
|
479
|
+
if invoking_internals
|
480
480
|
safe_invoke_without_incrementing_received_count(parent_stub, *args, &block)
|
481
481
|
else
|
482
482
|
invoke_incrementing_actual_calls_by(1, true, parent_stub, *args, &block)
|
@@ -487,6 +487,7 @@ module RSpec
|
|
487
487
|
def safe_invoke_without_incrementing_received_count(parent_stub, *args, &block)
|
488
488
|
invoke_incrementing_actual_calls_by(0, false, parent_stub, *args, &block)
|
489
489
|
end
|
490
|
+
ruby2_keywords :safe_invoke_without_incrementing_received_count if respond_to?(:ruby2_keywords, true)
|
490
491
|
|
491
492
|
def invoke_without_incrementing_received_count(parent_stub, *args, &block)
|
492
493
|
invoke_incrementing_actual_calls_by(0, true, parent_stub, *args, &block)
|
@@ -614,18 +615,25 @@ module RSpec
|
|
614
615
|
@exception_source_id ||= "#{self.class.name} #{__id__}"
|
615
616
|
end
|
616
617
|
|
617
|
-
def
|
618
|
-
RSpec::Support.thread_local_data[:"__rspec_#{object_id}
|
618
|
+
def invoking_internals
|
619
|
+
RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking_internals"]
|
619
620
|
end
|
620
621
|
|
621
|
-
def
|
622
|
-
|
622
|
+
def invoking_internals=(value)
|
623
|
+
# We clear the key for this rather than setting to false because otherwise the amount of
|
624
|
+
# thread local data will keep growing over the lifetime of the thread (which is a long
|
625
|
+
# time on a single threaded spec run e.g standard MRI)
|
626
|
+
if value
|
627
|
+
RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking_internals"] = true
|
628
|
+
else
|
629
|
+
RSpec::Support.thread_local_data.delete(:"__rspec_#{object_id}_invoking_internals")
|
630
|
+
end
|
623
631
|
end
|
624
632
|
|
625
633
|
def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, &block)
|
626
|
-
|
634
|
+
self.invoking_internals = true
|
627
635
|
|
628
|
-
|
636
|
+
args.unshift(orig_object) if yield_receiver_to_implementation_block?
|
629
637
|
|
630
638
|
if negative? || (allowed_to_fail && (@exactly || @at_most) && (@actual_received_count == @expected_received_count))
|
631
639
|
# args are the args we actually received, @argument_list_matcher is the
|
@@ -640,13 +648,15 @@ module RSpec
|
|
640
648
|
|
641
649
|
@order_group.handle_order_constraint self
|
642
650
|
|
651
|
+
self.invoking_internals = false
|
652
|
+
|
643
653
|
if implementation.present?
|
644
654
|
implementation.call(*args, &block)
|
645
655
|
elsif parent_stub
|
646
656
|
parent_stub.invoke(nil, *args, &block)
|
647
657
|
end
|
648
658
|
ensure
|
649
|
-
self.
|
659
|
+
self.invoking_internals = false
|
650
660
|
@actual_received_count_write_mutex.synchronize do
|
651
661
|
@actual_received_count += increment
|
652
662
|
end
|
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.13.
|
4
|
+
version: 3.13.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -43,7 +43,7 @@ cert_chain:
|
|
43
43
|
AwP+qZPPf97FXXZGEGIYhhHpnj+Ltx9nCetRPiZ4rvYBcXgCWVQSg6eiEofrMwn/
|
44
44
|
AKMCABhZ1Y2eATsfMgdkmIZk7JIPZiSi6eUxPiCMP9M/pw==
|
45
45
|
-----END CERTIFICATE-----
|
46
|
-
date:
|
46
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
47
47
|
dependencies:
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec-support
|
@@ -131,15 +131,16 @@ files:
|
|
131
131
|
- lib/rspec/mocks/verifying_message_expectation.rb
|
132
132
|
- lib/rspec/mocks/verifying_proxy.rb
|
133
133
|
- lib/rspec/mocks/version.rb
|
134
|
-
homepage: https://
|
134
|
+
homepage: https://rspec.info
|
135
135
|
licenses:
|
136
136
|
- MIT
|
137
137
|
metadata:
|
138
|
-
bug_tracker_uri: https://github.com/rspec/rspec
|
139
|
-
changelog_uri: https://github.com/rspec/rspec
|
138
|
+
bug_tracker_uri: https://github.com/rspec/rspec/issues
|
139
|
+
changelog_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.5/rspec-mocks/Changelog.md
|
140
140
|
documentation_uri: https://rspec.info/documentation/
|
141
141
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
142
|
-
|
142
|
+
rubygems_mfa_required: 'true'
|
143
|
+
source_code_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.5/rspec-mocks
|
143
144
|
rdoc_options:
|
144
145
|
- "--charset=UTF-8"
|
145
146
|
require_paths:
|
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
156
|
- !ruby/object:Gem::Version
|
156
157
|
version: '0'
|
157
158
|
requirements: []
|
158
|
-
rubygems_version: 3.6.
|
159
|
+
rubygems_version: 3.6.7
|
159
160
|
specification_version: 4
|
160
|
-
summary: rspec-mocks-3.13.
|
161
|
+
summary: rspec-mocks-3.13.5
|
161
162
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|