mocha 1.11.1 → 1.11.2

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/RELEASE.md +14 -0
  3. data/docs/Mocha.html +2 -2
  4. data/docs/Mocha/API.html +16 -18
  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 +12 -39
  17. data/docs/Mocha/ObjectMethods.html +2 -2
  18. data/docs/Mocha/ParameterMatchers.html +14 -26
  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 +5 -5
  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 +20 -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 +2 -3
  53. data/lib/mocha/mock.rb +40 -14
  54. data/lib/mocha/mockery.rb +10 -7
  55. data/lib/mocha/parameter_matchers/has_entries.rb +2 -3
  56. data/lib/mocha/parameter_matchers/has_entry.rb +2 -3
  57. data/lib/mocha/parameter_matchers/has_key.rb +2 -3
  58. data/lib/mocha/parameter_matchers/has_value.rb +2 -3
  59. data/lib/mocha/parameter_matchers/is_a.rb +2 -3
  60. data/lib/mocha/parameter_matchers/not.rb +2 -3
  61. data/lib/mocha/state_machine.rb +2 -3
  62. data/lib/mocha/stubbed_method.rb +4 -6
  63. data/lib/mocha/version.rb +1 -1
  64. data/test/acceptance/issue_457_test.rb +31 -0
  65. data/test/acceptance/mocha_example_test.rb +11 -1
  66. data/test/acceptance/mock_test.rb +36 -0
  67. data/test/acceptance/stubba_example_test.rb +11 -1
  68. metadata +3 -3
  69. data/lib/mocha/pretty_parameters.rb +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4d2242a81b567af96c5418bb54a86e5c7a4b0d2505c5263734afb920c9f0075
4
- data.tar.gz: 657404b8cd42ac3430f32f26fab952c0cf55c7f63489343fd81243f5a2eb9462
3
+ metadata.gz: 398d43b17f224be63c21bcd24cbe4d1bff6b90267e1a870eb4f2a3432515da88
4
+ data.tar.gz: bd7c4a5ce95a20b5b403750982d63356e1553af54f45d538cc3e3c514f7fb079
5
5
  SHA512:
6
- metadata.gz: 511a89f31cd9389de64d6a690d86abb8126e2290032aadcab124bf5b6947e27f848b131e41d1dd6f87d1b71758e6e76e26e6818325e409ef58ab09087a45f901
7
- data.tar.gz: a138d451d8676ac8c108a8fc583a1c8f100bc66e8a2bc864cef020d7d05108710221c9e4b54b1f0e25959b66af169fab4f277fa4a6570de958fa996ae1581ecc
6
+ metadata.gz: 0b8a00e3b21f5761fede57f919785ac653e714d28151325980d6ae5bd5d0a7ec5ecdcbaf96d6e36c6659347852e414b3a1c10fb57e0c72b981e70348308174f1
7
+ data.tar.gz: f85f050cbbb7bfa224420e8ad2f67f6b683576a1d8ef1d79f55acecda495febca0f6b0aae79721c0159028f752c2e19268f06c5dc8e27f40dd5449e8ea5b96ae
data/RELEASE.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Release Notes
2
2
 
3
+ ## 1.11.2
4
+
5
+ ### External changes
6
+
7
+ * Fix regression introduced in v1.10.0 that meant `Object#inspect` was called unnecessarily (368abd98)
8
+ * Warn when mock object receives invocations in another test - thanks to @nitishr (#442)
9
+ * Avoid rubocop comments appearing in YARD-generated docs (d8019eed)
10
+
11
+ ### Internal changes
12
+
13
+ * Replace `StubbedMethod#original_method` & `#original_visibility` attribute reader methods with instance variables - thanks to @nitishr (d917f332)
14
+ * Set up `MochaExampleTest` & `StubbaExampleTest` as acceptance tests - thanks to @nitishr (4881cc58)
15
+ * Delete unused `PrettyParameters` class - thanks to @nitishr (314ea922)
16
+
3
17
  ## 1.11.1
4
18
 
5
19
  ### External changes
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha
8
8
 
9
- &mdash; Mocha 1.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -244,7 +244,7 @@
244
244
  </div>
245
245
 
246
246
  <div id="footer">
247
- Generated on Tue Dec 17 12:49:35 2019 by
247
+ Generated on Sat Jan 4 17:36:46 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -317,8 +317,6 @@
317
317
 
318
318
  <p>Builds a new mock object</p>
319
319
 
320
- <p>rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity</p>
321
-
322
320
 
323
321
  </div>
324
322
  </div>
@@ -533,8 +531,8 @@
533
531
  <td>
534
532
  <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 69</span>
535
533
 
536
- <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>
537
- <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_reinstate_undocumented_behaviour_from_v1_9?'>reinstate_undocumented_behaviour_from_v1_9?</span>
534
+ <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> <span class='comment'># rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
535
+ </span> <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_reinstate_undocumented_behaviour_from_v1_9?'>reinstate_undocumented_behaviour_from_v1_9?</span>
538
536
  <span class='kw'>if</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Symbol</span><span class='rparen'>)</span>
539
537
  <span class='id identifier rubyid_method_name'>method_name</span> <span class='op'>=</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
540
538
  <span class='const'>Deprecation</span><span class='period'>.</span><span class='id identifier rubyid_warning'>warning</span><span class='lparen'>(</span>
@@ -634,12 +632,12 @@
634
632
  <pre class="lines">
635
633
 
636
634
 
635
+ 207
637
636
  208
638
- 209
639
- 210</pre>
637
+ 209</pre>
640
638
  </td>
641
639
  <td>
642
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 208</span>
640
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 207</span>
643
641
 
644
642
  <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>
645
643
  <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>
@@ -733,12 +731,12 @@
733
731
  <pre class="lines">
734
732
 
735
733
 
734
+ 237
736
735
  238
737
- 239
738
- 240</pre>
736
+ 239</pre>
739
737
  </td>
740
738
  <td>
741
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 238</span>
739
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 237</span>
742
740
 
743
741
  <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>
744
742
  <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>
@@ -937,6 +935,7 @@
937
935
  <pre class="lines">
938
936
 
939
937
 
938
+ 115
940
939
  116
941
940
  117
942
941
  118
@@ -960,11 +959,10 @@
960
959
  136
961
960
  137
962
961
  138
963
- 139
964
- 140</pre>
962
+ 139</pre>
965
963
  </td>
966
964
  <td>
967
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 116</span>
965
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 115</span>
968
966
 
969
967
  <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>
970
968
  <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_reinstate_undocumented_behaviour_from_v1_9?'>reinstate_undocumented_behaviour_from_v1_9?</span>
@@ -1203,6 +1201,7 @@
1203
1201
  <pre class="lines">
1204
1202
 
1205
1203
 
1204
+ 163
1206
1205
  164
1207
1206
  165
1208
1207
  166
@@ -1227,11 +1226,10 @@
1227
1226
  185
1228
1227
  186
1229
1228
  187
1230
- 188
1231
- 189</pre>
1229
+ 188</pre>
1232
1230
  </td>
1233
1231
  <td>
1234
- <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 164</span>
1232
+ <pre class="code"><span class="info file"># File 'lib/mocha/api.rb', line 163</span>
1235
1233
 
1236
1234
  <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>
1237
1235
  <span class='kw'>if</span> <span class='const'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span><span class='period'>.</span><span class='id identifier rubyid_configuration'>configuration</span><span class='period'>.</span><span class='id identifier rubyid_reinstate_undocumented_behaviour_from_v1_9?'>reinstate_undocumented_behaviour_from_v1_9?</span>
@@ -1277,7 +1275,7 @@
1277
1275
  </div>
1278
1276
 
1279
1277
  <div id="footer">
1280
- Generated on Tue Dec 17 12:49:35 2019 by
1278
+ Generated on Sat Jan 4 17:36:47 2020 by
1281
1279
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1282
1280
  0.9.20 (ruby-2.6.5).
1283
1281
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Mocha::ClassMethods
8
8
 
9
- &mdash; Mocha 1.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -254,7 +254,7 @@
254
254
  </div>
255
255
 
256
256
  <div id="footer">
257
- Generated on Tue Dec 17 12:49:35 2019 by
257
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -1515,7 +1515,7 @@ unsatisfied expectations:
1515
1515
  </div>
1516
1516
 
1517
1517
  <div id="footer">
1518
- Generated on Tue Dec 17 12:49:37 2019 by
1518
+ Generated on Sat Jan 4 17:36:48 2020 by
1519
1519
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1520
1520
  0.9.20 (ruby-2.6.5).
1521
1521
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: Mocha::Expectation
8
8
 
9
- &mdash; Mocha 1.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -2852,7 +2852,7 @@
2852
2852
  </div>
2853
2853
 
2854
2854
  <div id="footer">
2855
- Generated on Tue Dec 17 12:49:36 2019 by
2855
+ Generated on Sat Jan 4 17:36:48 2020 by
2856
2856
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2857
2857
  0.9.20 (ruby-2.6.5).
2858
2858
  </div>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: Mocha::ExpectationError
8
8
 
9
- &mdash; Mocha 1.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -142,7 +142,7 @@
142
142
  </div>
143
143
 
144
144
  <div id="footer">
145
- Generated on Tue Dec 17 12:49:37 2019 by
145
+ Generated on Sat Jan 4 17:36:48 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -250,7 +250,7 @@
250
250
  </div>
251
251
 
252
252
  <div id="footer">
253
- Generated on Tue Dec 17 12:49:37 2019 by
253
+ Generated on Sat Jan 4 17:36:48 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -360,7 +360,7 @@
360
360
  </div>
361
361
 
362
362
  <div id="footer">
363
- Generated on Tue Dec 17 12:49:35 2019 by
363
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -115,7 +115,7 @@
115
115
  </div>
116
116
 
117
117
  <div id="footer">
118
- Generated on Tue Dec 17 12:49:35 2019 by
118
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -113,7 +113,7 @@
113
113
  </div>
114
114
 
115
115
  <div id="footer">
116
- Generated on Tue Dec 17 12:49:35 2019 by
116
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -154,7 +154,7 @@
154
154
  </div>
155
155
 
156
156
  <div id="footer">
157
- Generated on Tue Dec 17 12:49:35 2019 by
157
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -113,7 +113,7 @@
113
113
  </div>
114
114
 
115
115
  <div id="footer">
116
- Generated on Tue Dec 17 12:49:35 2019 by
116
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -154,7 +154,7 @@
154
154
  </div>
155
155
 
156
156
  <div id="footer">
157
- Generated on Tue Dec 17 12:49:35 2019 by
157
+ Generated on Sat Jan 4 17:36:47 2020 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.11.1
9
+ &mdash; Mocha 1.11.2
10
10
 
11
11
  </title>
12
12
 
@@ -334,18 +334,7 @@
334
334
 
335
335
 
336
336
 
337
- </h3><div class="docstring">
338
- <div class="discussion">
339
-
340
- <p>rubocop:disable Style/MethodMissingSuper,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity</p>
341
-
342
-
343
- </div>
344
- </div>
345
- <div class="tags">
346
-
347
-
348
- </div><table class="source_code">
337
+ </h3><table class="source_code">
349
338
  <tr>
350
339
  <td>
351
340
  <pre class="lines">
@@ -360,35 +349,19 @@
360
349
  315
361
350
  316
362
351
  317
363
- 318
364
- 319
365
- 320
366
- 321
367
- 322
368
- 323
369
- 324
370
- 325
371
- 326</pre>
352
+ 318</pre>
372
353
  </td>
373
354
  <td>
374
355
  <pre class="code"><span class="info file"># File 'lib/mocha/mock.rb', line 309</span>
375
356
 
376
- <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
377
- <span class='kw'>if</span> <span class='ivar'>@responder</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='ivar'>@responder</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span>
378
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NoMethodError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>undefined method `</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_symbol'>symbol</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; for </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mocha_inspect'>mocha_inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> which responds like </span><span class='embexpr_beg'>#{</span><span class='ivar'>@responder</span><span class='period'>.</span><span class='id identifier rubyid_mocha_inspect'>mocha_inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
379
- <span class='kw'>end</span>
357
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Style/MethodMissingSuper
358
+ </span> <span class='id identifier rubyid_check_expiry'>check_expiry</span>
359
+ <span class='id identifier rubyid_check_responder_responds_to'>check_responder_responds_to</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='rparen'>)</span>
380
360
  <span class='id identifier rubyid_invocation'>invocation</span> <span class='op'>=</span> <span class='const'>Invocation</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
381
361
  <span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_matching_expectation_allowing_invocation'>matching_expectation_allowing_invocation</span> <span class='op'>=</span> <span class='id identifier rubyid_all_expectations'>all_expectations</span><span class='period'>.</span><span class='id identifier rubyid_match_allowing_invocation'>match_allowing_invocation</span><span class='lparen'>(</span><span class='id identifier rubyid_invocation'>invocation</span><span class='rparen'>)</span><span class='rparen'>)</span>
382
362
  <span class='id identifier rubyid_matching_expectation_allowing_invocation'>matching_expectation_allowing_invocation</span><span class='period'>.</span><span class='id identifier rubyid_invoke'>invoke</span><span class='lparen'>(</span><span class='id identifier rubyid_invocation'>invocation</span><span class='rparen'>)</span>
383
363
  <span class='kw'>elsif</span> <span class='lparen'>(</span><span class='id identifier rubyid_matching_expectation'>matching_expectation</span> <span class='op'>=</span> <span class='id identifier rubyid_all_expectations'>all_expectations</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_invocation'>invocation</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='op'>!</span><span class='id identifier rubyid_matching_expectation'>matching_expectation</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='ivar'>@everything_stubbed</span><span class='rparen'>)</span>
384
- <span class='kw'>if</span> <span class='ivar'>@unexpected_invocation</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
385
- <span class='ivar'>@unexpected_invocation</span> <span class='op'>=</span> <span class='id identifier rubyid_invocation'>invocation</span>
386
- <span class='id identifier rubyid_matching_expectation'>matching_expectation</span><span class='period'>.</span><span class='id identifier rubyid_invoke'>invoke</span><span class='lparen'>(</span><span class='id identifier rubyid_invocation'>invocation</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_matching_expectation'>matching_expectation</span>
387
- <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@unexpected_invocation</span><span class='period'>.</span><span class='id identifier rubyid_call_description'>call_description</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='ivar'>@mockery</span><span class='period'>.</span><span class='id identifier rubyid_mocha_inspect'>mocha_inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
388
- <span class='kw'>else</span>
389
- <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='ivar'>@unexpected_invocation</span><span class='period'>.</span><span class='id identifier rubyid_short_call_description'>short_call_description</span>
390
- <span class='kw'>end</span>
391
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ExpectationErrorFactory.html" title="Mocha::ExpectationErrorFactory (class)">ExpectationErrorFactory</a></span></span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>unexpected invocation: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_caller'>caller</span><span class='rparen'>)</span>
364
+ <span class='id identifier rubyid_raise_unexpected_invocation_error'>raise_unexpected_invocation_error</span><span class='lparen'>(</span><span class='id identifier rubyid_invocation'>invocation</span><span class='comma'>,</span> <span class='id identifier rubyid_matching_expectation'>matching_expectation</span><span class='rparen'>)</span>
392
365
  <span class='kw'>end</span>
393
366
  <span class='kw'>end</span></pre>
394
367
  </td>
@@ -643,12 +616,12 @@
643
616
  <pre class="lines">
644
617
 
645
618
 
646
- 344
647
- 345
648
- 346</pre>
619
+ 335
620
+ 336
621
+ 337</pre>
649
622
  </td>
650
623
  <td>
651
- <pre class="code"><span class="info file"># File 'lib/mocha/mock.rb', line 344</span>
624
+ <pre class="code"><span class="info file"># File 'lib/mocha/mock.rb', line 335</span>
652
625
 
653
626
  <span class='kw'>def</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='id identifier rubyid_include_private'>include_private</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
654
627
  <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_symbol'>symbol</span><span class='comma'>,</span> <span class='id identifier rubyid_include_private'>include_private</span><span class='rparen'>)</span>
@@ -1227,7 +1200,7 @@ object.stubbed_method # =&gt; unexpected invocation: #&lt;Mock:mock&gt;.stubbed_
1227
1200
  </div>
1228
1201
 
1229
1202
  <div id="footer">
1230
- Generated on Tue Dec 17 12:49:35 2019 by
1203
+ Generated on Sat Jan 4 17:36:47 2020 by
1231
1204
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1232
1205
  0.9.20 (ruby-2.6.5).
1233
1206
  </div>