mocha 1.10.0 → 1.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/RELEASE.md +5 -0
  3. data/docs/Mocha.html +2 -2
  4. data/docs/Mocha/API.html +25 -25
  5. data/docs/Mocha/ClassMethods.html +2 -2
  6. data/docs/Mocha/Configuration.html +2 -2
  7. data/docs/Mocha/Expectation.html +2 -2
  8. data/docs/Mocha/ExpectationError.html +2 -2
  9. data/docs/Mocha/ExpectationErrorFactory.html +2 -2
  10. data/docs/Mocha/Hooks.html +2 -2
  11. data/docs/Mocha/Integration.html +2 -2
  12. data/docs/Mocha/Integration/MiniTest.html +2 -2
  13. data/docs/Mocha/Integration/MiniTest/Adapter.html +2 -2
  14. data/docs/Mocha/Integration/TestUnit.html +2 -2
  15. data/docs/Mocha/Integration/TestUnit/Adapter.html +2 -2
  16. data/docs/Mocha/Mock.html +2 -2
  17. data/docs/Mocha/ObjectMethods.html +2 -2
  18. data/docs/Mocha/ParameterMatchers.html +2 -2
  19. data/docs/Mocha/ParameterMatchers/AllOf.html +2 -2
  20. data/docs/Mocha/ParameterMatchers/AnyOf.html +2 -2
  21. data/docs/Mocha/ParameterMatchers/AnyParameters.html +2 -2
  22. data/docs/Mocha/ParameterMatchers/Anything.html +2 -2
  23. data/docs/Mocha/ParameterMatchers/Base.html +2 -2
  24. data/docs/Mocha/ParameterMatchers/Equals.html +2 -2
  25. data/docs/Mocha/ParameterMatchers/EquivalentUri.html +2 -2
  26. data/docs/Mocha/ParameterMatchers/HasEntries.html +2 -2
  27. data/docs/Mocha/ParameterMatchers/HasEntry.html +2 -2
  28. data/docs/Mocha/ParameterMatchers/HasKey.html +2 -2
  29. data/docs/Mocha/ParameterMatchers/HasValue.html +2 -2
  30. data/docs/Mocha/ParameterMatchers/Includes.html +2 -2
  31. data/docs/Mocha/ParameterMatchers/InstanceOf.html +2 -2
  32. data/docs/Mocha/ParameterMatchers/IsA.html +2 -2
  33. data/docs/Mocha/ParameterMatchers/KindOf.html +2 -2
  34. data/docs/Mocha/ParameterMatchers/Not.html +2 -2
  35. data/docs/Mocha/ParameterMatchers/Optionally.html +2 -2
  36. data/docs/Mocha/ParameterMatchers/RegexpMatches.html +2 -2
  37. data/docs/Mocha/ParameterMatchers/RespondsWith.html +2 -2
  38. data/docs/Mocha/ParameterMatchers/YamlEquivalent.html +2 -2
  39. data/docs/Mocha/Sequence.html +2 -2
  40. data/docs/Mocha/StateMachine.html +2 -2
  41. data/docs/Mocha/StateMachine/State.html +2 -2
  42. data/docs/Mocha/StateMachine/StatePredicate.html +2 -2
  43. data/docs/Mocha/StubbingError.html +2 -2
  44. data/docs/_index.html +3 -3
  45. data/docs/file.COPYING.html +2 -2
  46. data/docs/file.MIT-LICENSE.html +2 -2
  47. data/docs/file.README.html +2 -2
  48. data/docs/file.RELEASE.html +9 -2
  49. data/docs/frames.html +1 -1
  50. data/docs/index.html +2 -2
  51. data/docs/top-level-namespace.html +2 -2
  52. data/lib/mocha/api.rb +5 -0
  53. data/lib/mocha/mockery.rb +4 -7
  54. data/lib/mocha/version.rb +1 -1
  55. data/test/acceptance/stubbing_non_existent_any_instance_method_test.rb +16 -0
  56. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36e0a4cb730451038106d6246562a358642a6651206ab432e9a57b4f9744ed50
4
- data.tar.gz: d5094f0893d49a4a3e74b506c887bbb4c2afe18bb7fdefa4a11a63e672799e50
3
+ metadata.gz: 37552b852159a54683d4acb532daa97dd5b4db6ba031399e07056d438b034717
4
+ data.tar.gz: 86be70d9b97b96f30bda6122a056f79a6a93e9a5e7e657fda8df3ce60f5e55ac
5
5
  SHA512:
6
- metadata.gz: 4cd3f74de8609e8ce4c88ea53a31e590f5d9ba4afdc0626842b85ba9eaf971d5db810b63f3924ea10f0b23f01cfc17e590b49b0169a14d6f9d4f33c64ec0804d
7
- data.tar.gz: 9d10054c6f3c7288f4e220fbcbfbcf9b86aa5466b6e85e2ad536da649f4468856e3a8c8ac73e491b22bd1665af3ae9fc9e2baa35d37f446308f9f6df5cdb97a3
6
+ metadata.gz: 7d0dded9eac7033c2fdefeeca1045bc6616c2c3a6f4376b83adc43fdae7af5b2771b8a395570e6417cc3ae431de01fca6253a477be29aac86d2607cc37395744
7
+ data.tar.gz: 44dd01735f61991c56031d85dd06c2f561ae518050daa17865714c25cdab70cfcc45a95b14220c8cb53656d2cc67c5b04660cbb7d47091bbd8b53a00e05c5093
data/RELEASE.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release Notes
2
2
 
3
+ ## 1.10.1
4
+
5
+ * Ensure ObjectMethods & ClassMethods included when API extended (43778756)
6
+ * Fix regression in `any_instance` stubbing of methods on object which has an implementation of `#respond_to?` that depends on the object's internal state - thanks to @rafaelfranca for reporting & @nitishr for fixing (#432, #434, 469d4b17)
7
+
3
8
  ## 1.10.0
4
9
 
5
10
  * Improve deprecation warning when requiring 'mocha/setup' (388f44d7)
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -244,7 +244,7 @@
244
244
  </div>
245
245
 
246
246
  <div id="footer">
247
- Generated on Mon Dec 2 17:48:40 2019 by
247
+ Generated on Wed Dec 4 09:20:47 2019 by
248
248
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
249
249
  0.9.20 (ruby-2.6.5).
250
250
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::API
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -502,12 +502,12 @@
502
502
  <pre class="lines">
503
503
 
504
504
 
505
- 63
506
- 64
507
- 65</pre>
505
+ 68
506
+ 69
507
+ 70</pre>
508
508
  </td>
509
509
  <td>
510
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 63</span>
510
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 68</span>
511
511
 
512
512
  <span class='kw'>def</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span>
513
513
  <span class='id identifier rubyid_create_mock'>create_mock</span><span class='lparen'>(</span><span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_mock'>mock</span><span class='comma'>,</span> <span class='id identifier rubyid_expectations'>expectations</span><span class='op'>|</span> <span class='id identifier rubyid_mock'>mock</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='id identifier rubyid_expectations'>expectations</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
@@ -588,12 +588,12 @@
588
588
  <pre class="lines">
589
589
 
590
590
 
591
- 133
592
- 134
593
- 135</pre>
591
+ 138
592
+ 139
593
+ 140</pre>
594
594
  </td>
595
595
  <td>
596
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 133</span>
596
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 138</span>
597
597
 
598
598
  <span class='kw'>def</span> <span class='id identifier rubyid_sequence'>sequence</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
599
599
  <span class='const'><span class='object_link'><a href="Sequence.html" title="Mocha::Sequence (class)">Sequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
@@ -687,12 +687,12 @@
687
687
  <pre class="lines">
688
688
 
689
689
 
690
- 163
691
- 164
692
- 165</pre>
690
+ 168
691
+ 169
692
+ 170</pre>
693
693
  </td>
694
694
  <td>
695
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 163</span>
695
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 168</span>
696
696
 
697
697
  <span class='kw'>def</span> <span class='id identifier rubyid_states'>states</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
698
698
  <span class='const'>Mockery</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_new_state_machine'>new_state_machine</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
@@ -889,12 +889,12 @@
889
889
  <pre class="lines">
890
890
 
891
891
 
892
- 86
893
- 87
894
- 88</pre>
892
+ 91
893
+ 92
894
+ 93</pre>
895
895
  </td>
896
896
  <td>
897
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 86</span>
897
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 91</span>
898
898
 
899
899
  <span class='kw'>def</span> <span class='id identifier rubyid_stub'>stub</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span>
900
900
  <span class='id identifier rubyid_create_mock'>create_mock</span><span class='lparen'>(</span><span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_stub'>stub</span><span class='comma'>,</span> <span class='id identifier rubyid_expectations'>expectations</span><span class='op'>|</span> <span class='id identifier rubyid_stub'>stub</span><span class='period'>.</span><span class='id identifier rubyid_stubs'>stubs</span><span class='lparen'>(</span><span class='id identifier rubyid_expectations'>expectations</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
@@ -1109,15 +1109,15 @@
1109
1109
  <pre class="lines">
1110
1110
 
1111
1111
 
1112
- 110
1113
- 111
1114
- 112
1115
- 113
1116
- 114
1117
- 115</pre>
1112
+ 115
1113
+ 116
1114
+ 117
1115
+ 118
1116
+ 119
1117
+ 120</pre>
1118
1118
  </td>
1119
1119
  <td>
1120
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 110</span>
1120
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 115</span>
1121
1121
 
1122
1122
  <span class='kw'>def</span> <span class='id identifier rubyid_stub_everything'>stub_everything</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span>
1123
1123
  <span class='id identifier rubyid_create_mock'>create_mock</span><span class='lparen'>(</span><span class='id identifier rubyid_arguments'>arguments</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_stub'>stub</span><span class='comma'>,</span> <span class='id identifier rubyid_expectations'>expectations</span><span class='op'>|</span>
@@ -1143,7 +1143,7 @@
1143
1143
  </div>
1144
1144
 
1145
1145
  <div id="footer">
1146
- Generated on Mon Dec 2 17:48:40 2019 by
1146
+ Generated on Wed Dec 4 09:20:47 2019 by
1147
1147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1148
1148
  0.9.20 (ruby-2.6.5).
1149
1149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::ClassMethods
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -254,7 +254,7 @@
254
254
  </div>
255
255
 
256
256
  <div id="footer">
257
- Generated on Mon Dec 2 17:48:40 2019 by
257
+ Generated on Wed Dec 4 09:20:47 2019 by
258
258
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
259
259
  0.9.20 (ruby-2.6.5).
260
260
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::Configuration
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -1373,7 +1373,7 @@ satisfied expectations:
1373
1373
  </div>
1374
1374
 
1375
1375
  <div id="footer">
1376
- Generated on Mon Dec 2 17:48:41 2019 by
1376
+ Generated on Wed Dec 4 09:20:48 2019 by
1377
1377
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1378
1378
  0.9.20 (ruby-2.6.5).
1379
1379
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::Expectation
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -2644,7 +2644,7 @@
2644
2644
  </div>
2645
2645
 
2646
2646
  <div id="footer">
2647
- Generated on Mon Dec 2 17:48:41 2019 by
2647
+ Generated on Wed Dec 4 09:20:48 2019 by
2648
2648
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2649
2649
  0.9.20 (ruby-2.6.5).
2650
2650
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: Mocha::ExpectationError
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -142,7 +142,7 @@
142
142
  </div>
143
143
 
144
144
  <div id="footer">
145
- Generated on Mon Dec 2 17:48:41 2019 by
145
+ Generated on Wed Dec 4 09:20:48 2019 by
146
146
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
147
147
  0.9.20 (ruby-2.6.5).
148
148
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ExpectationErrorFactory
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -250,7 +250,7 @@
250
250
  </div>
251
251
 
252
252
  <div id="footer">
253
- Generated on Mon Dec 2 17:48:41 2019 by
253
+ Generated on Wed Dec 4 09:20:48 2019 by
254
254
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
255
255
  0.9.20 (ruby-2.6.5).
256
256
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::Hooks
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -360,7 +360,7 @@
360
360
  </div>
361
361
 
362
362
  <div id="footer">
363
- Generated on Mon Dec 2 17:48:40 2019 by
363
+ Generated on Wed Dec 4 09:20:47 2019 by
364
364
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
365
365
  0.9.20 (ruby-2.6.5).
366
366
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::Integration
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -115,7 +115,7 @@
115
115
  </div>
116
116
 
117
117
  <div id="footer">
118
- Generated on Mon Dec 2 17:48:40 2019 by
118
+ Generated on Wed Dec 4 09:20:47 2019 by
119
119
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
120
120
  0.9.20 (ruby-2.6.5).
121
121
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::Integration::MiniTest
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -113,7 +113,7 @@
113
113
  </div>
114
114
 
115
115
  <div id="footer">
116
- Generated on Mon Dec 2 17:48:40 2019 by
116
+ Generated on Wed Dec 4 09:20:47 2019 by
117
117
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
118
118
  0.9.20 (ruby-2.6.5).
119
119
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::Integration::MiniTest::Adapter
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -154,7 +154,7 @@
154
154
  </div>
155
155
 
156
156
  <div id="footer">
157
- Generated on Mon Dec 2 17:48:40 2019 by
157
+ Generated on Wed Dec 4 09:20:47 2019 by
158
158
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
159
159
  0.9.20 (ruby-2.6.5).
160
160
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::Integration::TestUnit
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -113,7 +113,7 @@
113
113
  </div>
114
114
 
115
115
  <div id="footer">
116
- Generated on Mon Dec 2 17:48:40 2019 by
116
+ Generated on Wed Dec 4 09:20:47 2019 by
117
117
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
118
118
  0.9.20 (ruby-2.6.5).
119
119
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::Integration::TestUnit::Adapter
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -154,7 +154,7 @@
154
154
  </div>
155
155
 
156
156
  <div id="footer">
157
- Generated on Mon Dec 2 17:48:40 2019 by
157
+ Generated on Wed Dec 4 09:20:47 2019 by
158
158
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
159
159
  0.9.20 (ruby-2.6.5).
160
160
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::Mock
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -1227,7 +1227,7 @@ object.stubbed_method # =&gt; unexpected invocation: #&lt;Mock:mock&gt;.stubbed_
1227
1227
  </div>
1228
1228
 
1229
1229
  <div id="footer">
1230
- Generated on Mon Dec 2 17:48:40 2019 by
1230
+ Generated on Wed Dec 4 09:20:47 2019 by
1231
1231
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1232
1232
  0.9.20 (ruby-2.6.5).
1233
1233
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::ObjectMethods
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -755,7 +755,7 @@
755
755
  </div>
756
756
 
757
757
  <div id="footer">
758
- Generated on Mon Dec 2 17:48:40 2019 by
758
+ Generated on Wed Dec 4 09:20:47 2019 by
759
759
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
760
760
  0.9.20 (ruby-2.6.5).
761
761
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::ParameterMatchers
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -2951,7 +2951,7 @@ object.method_1(&#39;http://example.com/foo?a=1&amp;b=3&#39;)
2951
2951
  </div>
2952
2952
 
2953
2953
  <div id="footer">
2954
- Generated on Mon Dec 2 17:48:40 2019 by
2954
+ Generated on Wed Dec 4 09:20:47 2019 by
2955
2955
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2956
2956
  0.9.20 (ruby-2.6.5).
2957
2957
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::AllOf
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::AnyOf
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::AnyParameters
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::Anything
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::Base
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -431,7 +431,7 @@ object.run(:foo =&gt; &#39;foovalue&#39;, :bar =&gt; &#39;barvalue)</code></pre>
431
431
  </div>
432
432
 
433
433
  <div id="footer">
434
- Generated on Mon Dec 2 17:48:41 2019 by
434
+ Generated on Wed Dec 4 09:20:48 2019 by
435
435
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
436
436
  0.9.20 (ruby-2.6.5).
437
437
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::Equals
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::EquivalentUri
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::HasEntries
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::HasEntry
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::HasKey
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::HasValue
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::Includes
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::InstanceOf
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::IsA
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::KindOf
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::Not
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::Optionally
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::RegexpMatches
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::RespondsWith
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::ParameterMatchers::YamlEquivalent
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -143,7 +143,7 @@
143
143
  </div>
144
144
 
145
145
  <div id="footer">
146
- Generated on Mon Dec 2 17:48:41 2019 by
146
+ Generated on Wed Dec 4 09:20:48 2019 by
147
147
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
148
148
  0.9.20 (ruby-2.6.5).
149
149
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::Sequence
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -139,7 +139,7 @@
139
139
  </div>
140
140
 
141
141
  <div id="footer">
142
- Generated on Mon Dec 2 17:48:41 2019 by
142
+ Generated on Wed Dec 4 09:20:48 2019 by
143
143
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
144
144
  0.9.20 (ruby-2.6.5).
145
145
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::StateMachine
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -517,7 +517,7 @@
517
517
  </div>
518
518
 
519
519
  <div id="footer">
520
- Generated on Mon Dec 2 17:48:41 2019 by
520
+ Generated on Wed Dec 4 09:20:48 2019 by
521
521
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
522
522
  0.9.20 (ruby-2.6.5).
523
523
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::StateMachine::State
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -130,7 +130,7 @@
130
130
  </div>
131
131
 
132
132
  <div id="footer">
133
- Generated on Mon Dec 2 17:48:41 2019 by
133
+ Generated on Wed Dec 4 09:20:48 2019 by
134
134
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
135
135
  0.9.20 (ruby-2.6.5).
136
136
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::StateMachine::StatePredicate
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -130,7 +130,7 @@
130
130
  </div>
131
131
 
132
132
  <div id="footer">
133
- Generated on Mon Dec 2 17:48:41 2019 by
133
+ Generated on Wed Dec 4 09:20:48 2019 by
134
134
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
135
135
  0.9.20 (ruby-2.6.5).
136
136
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::StubbingError
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -140,7 +140,7 @@
140
140
  </div>
141
141
 
142
142
  <div id="footer">
143
- Generated on Mon Dec 2 17:48:41 2019 by
143
+ Generated on Wed Dec 4 09:20:48 2019 by
144
144
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
145
145
  0.9.20 (ruby-2.6.5).
146
146
  </div>
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>
7
- Mocha 1.10.0
7
+ Mocha 1.10.1
8
8
 
9
9
  </title>
10
10
 
@@ -52,7 +52,7 @@
52
52
  <div class="clear"></div>
53
53
  </div>
54
54
 
55
- <div id="content"><h1 class="noborder title">Mocha 1.10.0</h1>
55
+ <div id="content"><h1 class="noborder title">Mocha 1.10.1</h1>
56
56
  <div id="listing">
57
57
  <h1 class="alphaindex">Alphabetic Index</h1>
58
58
 
@@ -509,7 +509,7 @@
509
509
  </div>
510
510
 
511
511
  <div id="footer">
512
- Generated on Mon Dec 2 17:48:39 2019 by
512
+ Generated on Wed Dec 4 09:20:46 2019 by
513
513
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
514
514
  0.9.20 (ruby-2.6.5).
515
515
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: COPYING
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -71,7 +71,7 @@
71
71
  </div>
72
72
 
73
73
  <div id="footer">
74
- Generated on Mon Dec 2 17:48:39 2019 by
74
+ Generated on Wed Dec 4 09:20:46 2019 by
75
75
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
76
76
  0.9.20 (ruby-2.6.5).
77
77
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: MIT-LICENSE
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -75,7 +75,7 @@
75
75
  </div>
76
76
 
77
77
  <div id="footer">
78
- Generated on Mon Dec 2 17:48:39 2019 by
78
+ Generated on Wed Dec 4 09:20:46 2019 by
79
79
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
80
80
  0.9.20 (ruby-2.6.5).
81
81
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -438,7 +438,7 @@ Pushed mocha 1.2.0 to rubygems.org.
438
438
  </div>
439
439
 
440
440
  <div id="footer">
441
- Generated on Mon Dec 2 17:48:39 2019 by
441
+ Generated on Wed Dec 4 09:20:46 2019 by
442
442
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
443
443
  0.9.20 (ruby-2.6.5).
444
444
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: RELEASE
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -59,6 +59,13 @@
59
59
 
60
60
  <div id="content"><div id='filecontents'><h1>Release Notes</h1>
61
61
 
62
+ <h2>1.10.1</h2>
63
+
64
+ <ul>
65
+ <li>Ensure ObjectMethods &amp; ClassMethods included when API extended (43778756)</li>
66
+ <li>Fix regression in <code>any_instance</code> stubbing of methods on object which has an implementation of <code>#respond_to?</code> that depends on the object&#39;s internal state - thanks to @rafaelfranca for reporting &amp; @nitishr for fixing (#432, #434, 469d4b17)</li>
67
+ </ul>
68
+
62
69
  <h2>1.10.0</h2>
63
70
 
64
71
  <ul>
@@ -946,7 +953,7 @@ Hash with wrong number of entries.</li>
946
953
  </div>
947
954
 
948
955
  <div id="footer">
949
- Generated on Mon Dec 2 17:48:39 2019 by
956
+ Generated on Wed Dec 4 09:20:46 2019 by
950
957
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
951
958
  0.9.20 (ruby-2.6.5).
952
959
  </div>
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Mocha 1.10.0</title>
5
+ <title>Mocha 1.10.1</title>
6
6
  </head>
7
7
  <script type="text/javascript" charset="utf-8">
8
8
  var match = unescape(window.location.hash).match(/^#!(.+)/);
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -438,7 +438,7 @@ Pushed mocha 1.2.0 to rubygems.org.
438
438
  </div>
439
439
 
440
440
  <div id="footer">
441
- Generated on Mon Dec 2 17:48:39 2019 by
441
+ Generated on Wed Dec 4 09:20:46 2019 by
442
442
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
443
443
  0.9.20 (ruby-2.6.5).
444
444
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Mocha 1.10.0
9
+ &mdash; Mocha 1.10.1
10
10
 
11
11
  </title>
12
12
 
@@ -108,7 +108,7 @@
108
108
  </div>
109
109
 
110
110
  <div id="footer">
111
- Generated on Mon Dec 2 17:48:39 2019 by
111
+ Generated on Wed Dec 4 09:20:46 2019 by
112
112
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
113
113
  0.9.20 (ruby-2.6.5).
114
114
  </div>
@@ -40,6 +40,11 @@ module Mocha
40
40
  Class.send(:include, Mocha::ClassMethods)
41
41
  end
42
42
 
43
+ # @private
44
+ def self.extended(mod)
45
+ included(mod)
46
+ end
47
+
43
48
  # Builds a new mock object
44
49
  #
45
50
  # @return [Mock] a new mock object
@@ -151,14 +151,11 @@ module Mocha
151
151
  private
152
152
 
153
153
  def check(action, description, method_signature, backtrace = caller)
154
- return if block_given? && !yield
154
+ treatment = Mocha.configuration.send(action)
155
+ return if (treatment == :allow) || (block_given? && !yield)
155
156
  message = "stubbing #{description}: #{method_signature}"
156
- case Mocha.configuration.send(action)
157
- when :warn
158
- logger.warn(message)
159
- when :prevent
160
- raise StubbingError.new(message, backtrace)
161
- end
157
+ raise StubbingError.new(message, backtrace) if treatment == :prevent
158
+ logger.warn(message) if treatment == :warn
162
159
  end
163
160
 
164
161
  def expectations
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = '1.10.0'.freeze
2
+ VERSION = '1.10.1'.freeze
3
3
  end
@@ -76,6 +76,22 @@ class StubbingNonExistentAnyInstanceMethodTest < Mocha::TestCase
76
76
  assert_passed(test_result)
77
77
  end
78
78
 
79
+ def test_should_default_to_allowing_stubbing_method_if_responds_to_depends_on_calling_initialize
80
+ klass = Class.new do
81
+ def initialize(attrs = {})
82
+ @attributes = attrs
83
+ end
84
+
85
+ def respond_to?(method, _include_private = false)
86
+ @attributes.key?(method) ? @attributes[method] : super
87
+ end
88
+ end
89
+ test_result = run_as_test do
90
+ klass.any_instance.stubs(:foo)
91
+ end
92
+ assert_passed(test_result)
93
+ end
94
+
79
95
  def test_should_allow_stubbing_existing_protected_any_instance_method
80
96
  Mocha.configure { |c| c.stubbing_non_existent_method = :prevent }
81
97
  klass = Class.new do
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.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Mead
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake