mocha 1.15.0 → 1.15.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6be1c2dafee7237e2ff675159cbc86afd1b5a56493d2671eba64cc4fbb001dd
4
- data.tar.gz: 2bde2824fd9b2f5a3ba6445f9f3e42e1e97053f235eb5fea647410f037a0cee2
3
+ metadata.gz: 5f69e06715dfda038470d522472d10e99e4de02d57f1efe4d4f81caaff7856e4
4
+ data.tar.gz: a1fae0b515f7f76108c58fc151995eaab5a03a3d034820e3853799c2f571bcda
5
5
  SHA512:
6
- metadata.gz: fd3c082fca1dd5123b1c7ac6dd65ba4c9a2e92ec8791dcbc6f3d4a9a9f9c8161cf8cf4b9058c7483f5419118cdfea6cfc17cc0b206964dfc98ed8271852ea5ee
7
- data.tar.gz: 074fcc5048dd385eb929c03b5757c517eaceb0f72e8536500d867b3571f072a7aa29afc8a7a78a4ab0db3c7208a5c811c0a5754d30b9ebaec213ea1337f17eea
6
+ metadata.gz: 997c75e49d45c59eab07d55c940bf56bf94161a4b1940de46f70ab5d3c8749657de799d61ac519b85e89de9154618df5cd5d4eedcb7ab85499cf404eb5ad54f4
7
+ data.tar.gz: 90122aa4932173fc3dfc2b7295f97af05f23abb0967fc46da3a7c977ec4b16371595f21b9eeae58c50024a57e20dd3861e91ab67a405a0b29d20267a46b8800e
data/RELEASE.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release Notes
2
2
 
3
+ ## 1.15.1
4
+
5
+ ### External changes
6
+
7
+ * Fix regression in `Mock#responds_like` behaviour - thanks to @adrianna-chang-shopify for reporting (#580,#583,c586a08c)
8
+
3
9
  ## 1.15.0
4
10
 
5
11
  ### External changes
data/lib/mocha/mock.rb CHANGED
@@ -182,11 +182,11 @@ module Mocha
182
182
  end
183
183
  end
184
184
 
185
- # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds. The constraint is only applied at method invocation time.
185
+ # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time.
186
186
  #
187
- # A +NoMethodError+ will be raised if the +responder+ does not +#respond_to?+ a method invocation (even if the method has been expected or stubbed).
187
+ # A +NoMethodError+ will be raised if the +responder+ does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed).
188
188
  #
189
- # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+.
189
+ # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered.
190
190
  #
191
191
  # Note that the methods on +responder+ are never actually invoked.
192
192
  #
@@ -236,11 +236,11 @@ module Mocha
236
236
  self
237
237
  end
238
238
 
239
- # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+.
239
+ # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+.
240
240
  #
241
- # A +NoMethodError+ will be raised if the responder instance does not +#respond_to?+ a method invocation (even if the method has been expected or stubbed).
241
+ # A +NoMethodError+ will be raised if the responder instance does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed).
242
242
  #
243
- # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance.
243
+ # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered.
244
244
  #
245
245
  # Note that the methods on the responder instance are never actually invoked.
246
246
  #
@@ -325,9 +325,9 @@ module Mocha
325
325
  end
326
326
 
327
327
  # @private
328
- def respond_to_missing?(symbol, include_all)
328
+ def respond_to_missing?(symbol, _include_all)
329
329
  if @responder
330
- @responder.respond_to?(symbol, include_all)
330
+ @responder.respond_to?(symbol)
331
331
  else
332
332
  @everything_stubbed || all_expectations.matches_method?(symbol)
333
333
  end
data/lib/mocha/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = '1.15.0'.freeze
2
+ VERSION = '1.15.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Mead
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-21 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Mocking and stubbing library with JMock/SchMock syntax, which allows
14
14
  mocking and stubbing of methods on real (non-mock) classes.
@@ -139,7 +139,7 @@ licenses:
139
139
  - MIT
140
140
  - BSD-2-Clause
141
141
  metadata: {}
142
- post_install_message:
142
+ post_install_message:
143
143
  rdoc_options: []
144
144
  require_paths:
145
145
  - lib
@@ -154,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.1.6
158
- signing_key:
157
+ rubygems_version: 3.3.3
158
+ signing_key:
159
159
  specification_version: 4
160
160
  summary: Mocking and stubbing library
161
161
  test_files: []