rspec-mocks 3.13.3 → 3.13.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b76606e53f7acd8eea3d3e622b29c000c554d03b48454d66a85090a9b0b3525
4
- data.tar.gz: a7832ad6bace4ab325cc5c2fa66384979e4155ad76f1dd5bb66b3533e15365cc
3
+ metadata.gz: 70aeeb12e29656230a9a1eb6a7d5021d7dce9d6bbb548436eddfb13743ac27cd
4
+ data.tar.gz: e902f36538ed12570a3b2f023f06b29731aa24c1304b3b3b1dc20467f36f9a86
5
5
  SHA512:
6
- metadata.gz: e832958f3eb2444f16c0388d0f21a5c5ee796fd59e7c8fdd1e72f0a70bf1e0d1ad4e675ebca2917d6810f553a1c0e58b11336cc68a9bfadea8da7915602c382f
7
- data.tar.gz: d1a7f0cabbde5140b2b50da89cce99507592ccca3ced5839bfc97b4cfa8fe3f663142b537fcc02cc779ba8fd146c67e101291732e13c980804e514ffe9a4b8dc
6
+ metadata.gz: 5273cf8c51575510fb8481c2179b7681bb70bae00f9a014339fe96316ba19c91a39531adef23b066d06d461e25c4749d13813197cabece3130f26c22ce36a1e2
7
+ data.tar.gz: 69a316cce8b839cedd41441b18546a752b435c05930d197c3433be5506cdf42748a524031f7fc701610e4dfc21be1dc9ab9cb4a669df7d3032038281a24921e8
checksums.yaml.gz.sig CHANGED
Binary file
data/Changelog.md CHANGED
@@ -1,7 +1,18 @@
1
1
  ### Development
2
- [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.3...3-13-maintenance)
2
+ [Full Changelog](https://github.com/rspec/rspec/compare/rspec-mocks-v3.13.4...3-13-maintenance)
3
3
 
4
- # 3.13.3 / 2025-05-01
4
+ ### 3.13.4 / 2025-05-05
5
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.3...v3.13.4)
6
+
7
+ Bug Fixes:
8
+
9
+ * Fix regression where nested stubbed method calls would inadvertently not be counted.
10
+ (Jon Rowe, rspec/rspec#214)
11
+ * Fix regression where keyword arguments would not be passed through to nested stubbed
12
+ method calls. (Jon Rowe, rspec/rspec#214)
13
+
14
+ ### 3.13.3 / 2025-05-01
15
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.13.2...v3.13.3)
5
16
 
6
17
  Bug Fixes:
7
18
 
@@ -439,7 +439,7 @@ module RSpec
439
439
  @ordered = false
440
440
  @at_least = @at_most = @exactly = nil
441
441
 
442
- self.invoking = false
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 invoking
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,18 @@ module RSpec
614
615
  @exception_source_id ||= "#{self.class.name} #{__id__}"
615
616
  end
616
617
 
617
- def invoking
618
- RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking"]
618
+ def invoking_internals
619
+ RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking_internals"]
619
620
  end
620
621
 
621
- def invoking=(value)
622
- RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking"] = value
622
+ def invoking_internals=(value)
623
+ RSpec::Support.thread_local_data[:"__rspec_#{object_id}_invoking_internals"] = value
623
624
  end
624
625
 
625
626
  def invoke_incrementing_actual_calls_by(increment, allowed_to_fail, parent_stub, *args, &block)
626
- args.unshift(orig_object) if yield_receiver_to_implementation_block?
627
+ self.invoking_internals = true
627
628
 
628
- self.invoking = true
629
+ args.unshift(orig_object) if yield_receiver_to_implementation_block?
629
630
 
630
631
  if negative? || (allowed_to_fail && (@exactly || @at_most) && (@actual_received_count == @expected_received_count))
631
632
  # args are the args we actually received, @argument_list_matcher is the
@@ -640,13 +641,15 @@ module RSpec
640
641
 
641
642
  @order_group.handle_order_constraint self
642
643
 
644
+ self.invoking_internals = false
645
+
643
646
  if implementation.present?
644
647
  implementation.call(*args, &block)
645
648
  elsif parent_stub
646
649
  parent_stub.invoke(nil, *args, &block)
647
650
  end
648
651
  ensure
649
- self.invoking = false
652
+ self.invoking_internals = false
650
653
  @actual_received_count_write_mutex.synchronize do
651
654
  @actual_received_count += increment
652
655
  end
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec mocks.
4
4
  module Version
5
5
  # Version of RSpec mocks currently in use in SemVer format.
6
- STRING = '3.13.3'
6
+ STRING = '3.13.4'
7
7
  end
8
8
  end
9
9
  end
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.3
4
+ version: 3.13.4
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: 2025-05-01 00:00:00.000000000 Z
46
+ date: 2025-05-05 00:00:00.000000000 Z
47
47
  dependencies:
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec-support
@@ -135,11 +135,12 @@ homepage: https://github.com/rspec/rspec-mocks
135
135
  licenses:
136
136
  - MIT
137
137
  metadata:
138
- bug_tracker_uri: https://github.com/rspec/rspec-mocks/issues
139
- changelog_uri: https://github.com/rspec/rspec-mocks/blob/v3.13.3/Changelog.md
138
+ bug_tracker_uri: https://github.com/rspec/rspec/issues
139
+ changelog_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.4/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
- source_code_uri: https://github.com/rspec/rspec-mocks
142
+ rubygems_mfa_required: 'true'
143
+ source_code_uri: https://github.com/rspec/rspec/blob/rspec-mocks-v3.13.4/rspec-mocks
143
144
  rdoc_options:
144
145
  - "--charset=UTF-8"
145
146
  require_paths:
@@ -157,5 +158,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
158
  requirements: []
158
159
  rubygems_version: 3.6.2
159
160
  specification_version: 4
160
- summary: rspec-mocks-3.13.3
161
+ summary: rspec-mocks-3.13.4
161
162
  test_files: []
metadata.gz.sig CHANGED
Binary file