mocha 1.11.1 → 1.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/RELEASE.md +14 -0
- data/docs/Mocha.html +2 -2
- data/docs/Mocha/API.html +16 -18
- data/docs/Mocha/ClassMethods.html +2 -2
- data/docs/Mocha/Configuration.html +2 -2
- data/docs/Mocha/Expectation.html +2 -2
- data/docs/Mocha/ExpectationError.html +2 -2
- data/docs/Mocha/ExpectationErrorFactory.html +2 -2
- data/docs/Mocha/Hooks.html +2 -2
- data/docs/Mocha/Integration.html +2 -2
- data/docs/Mocha/Integration/MiniTest.html +2 -2
- data/docs/Mocha/Integration/MiniTest/Adapter.html +2 -2
- data/docs/Mocha/Integration/TestUnit.html +2 -2
- data/docs/Mocha/Integration/TestUnit/Adapter.html +2 -2
- data/docs/Mocha/Mock.html +12 -39
- data/docs/Mocha/ObjectMethods.html +2 -2
- data/docs/Mocha/ParameterMatchers.html +14 -26
- data/docs/Mocha/ParameterMatchers/AllOf.html +2 -2
- data/docs/Mocha/ParameterMatchers/AnyOf.html +2 -2
- data/docs/Mocha/ParameterMatchers/AnyParameters.html +2 -2
- data/docs/Mocha/ParameterMatchers/Anything.html +2 -2
- data/docs/Mocha/ParameterMatchers/Base.html +2 -2
- data/docs/Mocha/ParameterMatchers/Equals.html +2 -2
- data/docs/Mocha/ParameterMatchers/EquivalentUri.html +2 -2
- data/docs/Mocha/ParameterMatchers/HasEntries.html +2 -2
- data/docs/Mocha/ParameterMatchers/HasEntry.html +2 -2
- data/docs/Mocha/ParameterMatchers/HasKey.html +2 -2
- data/docs/Mocha/ParameterMatchers/HasValue.html +2 -2
- data/docs/Mocha/ParameterMatchers/Includes.html +2 -2
- data/docs/Mocha/ParameterMatchers/InstanceOf.html +2 -2
- data/docs/Mocha/ParameterMatchers/IsA.html +2 -2
- data/docs/Mocha/ParameterMatchers/KindOf.html +2 -2
- data/docs/Mocha/ParameterMatchers/Not.html +2 -2
- data/docs/Mocha/ParameterMatchers/Optionally.html +2 -2
- data/docs/Mocha/ParameterMatchers/RegexpMatches.html +2 -2
- data/docs/Mocha/ParameterMatchers/RespondsWith.html +2 -2
- data/docs/Mocha/ParameterMatchers/YamlEquivalent.html +2 -2
- data/docs/Mocha/Sequence.html +2 -2
- data/docs/Mocha/StateMachine.html +5 -5
- data/docs/Mocha/StateMachine/State.html +2 -2
- data/docs/Mocha/StateMachine/StatePredicate.html +2 -2
- data/docs/Mocha/StubbingError.html +2 -2
- data/docs/_index.html +3 -3
- data/docs/file.COPYING.html +2 -2
- data/docs/file.MIT-LICENSE.html +2 -2
- data/docs/file.README.html +2 -2
- data/docs/file.RELEASE.html +20 -2
- data/docs/frames.html +1 -1
- data/docs/index.html +2 -2
- data/docs/top-level-namespace.html +2 -2
- data/lib/mocha/api.rb +2 -3
- data/lib/mocha/mock.rb +40 -14
- data/lib/mocha/mockery.rb +10 -7
- data/lib/mocha/parameter_matchers/has_entries.rb +2 -3
- data/lib/mocha/parameter_matchers/has_entry.rb +2 -3
- data/lib/mocha/parameter_matchers/has_key.rb +2 -3
- data/lib/mocha/parameter_matchers/has_value.rb +2 -3
- data/lib/mocha/parameter_matchers/is_a.rb +2 -3
- data/lib/mocha/parameter_matchers/not.rb +2 -3
- data/lib/mocha/state_machine.rb +2 -3
- data/lib/mocha/stubbed_method.rb +4 -6
- data/lib/mocha/version.rb +1 -1
- data/test/acceptance/issue_457_test.rb +31 -0
- data/test/acceptance/mocha_example_test.rb +11 -1
- data/test/acceptance/mock_test.rb +36 -0
- data/test/acceptance/stubba_example_test.rb +11 -1
- metadata +3 -3
- data/lib/mocha/pretty_parameters.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 398d43b17f224be63c21bcd24cbe4d1bff6b90267e1a870eb4f2a3432515da88
|
4
|
+
data.tar.gz: bd7c4a5ce95a20b5b403750982d63356e1553af54f45d538cc3e3c514f7fb079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/docs/Mocha.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha
|
8
8
|
|
9
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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>
|
data/docs/Mocha/API.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::API
|
8
8
|
|
9
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
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
|
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
|
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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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>
|
data/docs/Mocha/Expectation.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Mocha::Expectation
|
8
8
|
|
9
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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>
|
data/docs/Mocha/Hooks.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::Hooks
|
8
8
|
|
9
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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>
|
data/docs/Mocha/Integration.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::Integration
|
8
8
|
|
9
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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
|
-
— Mocha 1.11.
|
9
|
+
— 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
|
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>
|
data/docs/Mocha/Mock.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Mocha::Mock
|
8
8
|
|
9
|
-
— Mocha 1.11.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -334,18 +334,7 @@
|
|
334
334
|
|
335
335
|
|
336
336
|
|
337
|
-
</h3><
|
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'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
377
|
-
|
378
|
-
|
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'>&</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'>&</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'>&&</span> <span class='op'>!</span><span class='ivar'>@everything_stubbed</span><span class='rparen'>)</span>
|
384
|
-
<span class='
|
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'>"</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'>"</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'>"</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'>"</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
|
-
|
647
|
-
|
648
|
-
|
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
|
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 # => unexpected invocation: #<Mock:mock>.stubbed_
|
|
1227
1200
|
</div>
|
1228
1201
|
|
1229
1202
|
<div id="footer">
|
1230
|
-
Generated on
|
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>
|