mocha 2.0.1 → 2.0.2

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: 81bbdc1243eca4d6ca258b07e9738745a329022a6c70951f5cf5e613a7ac5ee4
4
- data.tar.gz: 398d1b4de44a9caaaa3a602b346e5f392356d2347127f8c70f08a0950d31b335
3
+ metadata.gz: 4f349dc7259b6d387aaf194adc6c6f93fe39b9b785ce42489e2abf168c58dc84
4
+ data.tar.gz: '08a9210b39673183198a69a82d368b14af06722cc136a72635638b69a7a9e1b1'
5
5
  SHA512:
6
- metadata.gz: 607d34cccbe3a09d7986a435b88e30612b09832e658b97ae0b7893480bc466a20cd88f47cfb818b607ed71dc6ddd29854f75ff67a9d57df20075c938f0b35ecf
7
- data.tar.gz: 8cac0563afe03c8182b5a52f14c7f1419c9024e6bceca570eeca899fb1fb139ca74dbacead46394330562f99c12ad608f07e391c48624953e23463ff076e8729
6
+ metadata.gz: 1d77dedb5f4016ab1f2932a18b9d574a0e1de87ab0bc77cf5757920c8ca231a2c5872688a5c1dc8dbd530e81d9e8f1c6feb218c469126685ca822e953c568263
7
+ data.tar.gz: 6545a73cfed1eb00f94ca06f1cd12606db4377c6e8a5f228a512464e106e129a584d6cedf195602dad45398a2e8346e2abd98c353209e41a4b13da64a9fbc635
data/RELEASE.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release Notes
2
2
 
3
+ ## 2.0.2
4
+
5
+ ### External changes
6
+
7
+ * Fix regression in `Mock#responds_like` behaviour - thanks to @adrianna-chang-shopify for reporting (#580,#583,ba4d619e)
8
+
3
9
  ## 2.0.1
4
10
 
5
11
  ### External changes
@@ -41,6 +47,12 @@ from the Ruby v1.8 standard library are no longer supported (#540,969f4845)
41
47
  * Add missing `require` statement (73493761)
42
48
  * Disable Style/Semicolon cop globally (8cd0b705)
43
49
 
50
+ ## 1.16.1
51
+
52
+ ### External changes
53
+
54
+ * Fix regression in `Mock#responds_like` behaviour - thanks to @adrianna-chang-shopify for reporting (#580,#583,77af2af1)
55
+
44
56
  ## 1.16.0
45
57
 
46
58
  ### External changes
@@ -52,6 +64,12 @@ from the Ruby v1.8 standard library are no longer supported (#540,969f4845)
52
64
 
53
65
  * Remove redundant deprecation disabling in MockTest (dc8ca969)
54
66
 
67
+ ## 1.15.1
68
+
69
+ ### External changes
70
+
71
+ * Fix regression in `Mock#responds_like` behaviour - thanks to @adrianna-chang-shopify for reporting (#580,#583,c586a08c)
72
+
55
73
  ## 1.15.0
56
74
 
57
75
  ### External changes
data/lib/mocha/mock.rb CHANGED
@@ -183,11 +183,11 @@ module Mocha
183
183
  end
184
184
  end
185
185
 
186
- # 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.
186
+ # 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.
187
187
  #
188
- # A +NoMethodError+ will be raised if the +responder+ does not +#respond_to?+ a method invocation (even if the method has been expected or stubbed).
188
+ # 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).
189
189
  #
190
- # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+.
190
+ # 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.
191
191
  #
192
192
  # Note that the methods on +responder+ are never actually invoked.
193
193
  #
@@ -237,11 +237,11 @@ module Mocha
237
237
  self
238
238
  end
239
239
 
240
- # 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+.
240
+ # 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+.
241
241
  #
242
- # 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).
242
+ # 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).
243
243
  #
244
- # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance.
244
+ # 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.
245
245
  #
246
246
  # Note that the methods on the responder instance are never actually invoked.
247
247
  #
@@ -329,9 +329,9 @@ module Mocha
329
329
  end
330
330
 
331
331
  # @private
332
- def respond_to_missing?(symbol, include_all)
332
+ def respond_to_missing?(symbol, _include_all)
333
333
  if @responder
334
- @responder.respond_to?(symbol, include_all)
334
+ @responder.respond_to?(symbol)
335
335
  else
336
336
  @everything_stubbed || all_expectations.matches_method?(symbol)
337
337
  end
data/lib/mocha/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.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: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Mead
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-03 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2_keywords