mocha 1.9.0 → 1.10.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +7 -30
- data/README.md +10 -11
- data/RELEASE.md +48 -0
- data/Rakefile +9 -3
- data/docs/CNAME +1 -0
- data/docs/Mocha.html +132 -5
- data/docs/Mocha/API.html +289 -216
- data/docs/Mocha/ClassMethods.html +88 -16
- data/docs/Mocha/Configuration.html +931 -174
- data/docs/Mocha/Expectation.html +200 -255
- data/docs/Mocha/ExpectationError.html +5 -10
- data/docs/Mocha/ExpectationErrorFactory.html +9 -18
- data/docs/Mocha/Hooks.html +12 -27
- data/docs/Mocha/Integration.html +3 -3
- data/docs/Mocha/Integration/MiniTest.html +3 -3
- data/docs/Mocha/Integration/MiniTest/Adapter.html +5 -6
- data/docs/Mocha/Integration/TestUnit.html +3 -3
- data/docs/Mocha/Integration/TestUnit/Adapter.html +5 -6
- data/docs/Mocha/Mock.html +202 -162
- data/docs/Mocha/ObjectMethods.html +121 -68
- data/docs/Mocha/ParameterMatchers.html +21 -109
- data/docs/Mocha/ParameterMatchers/AllOf.html +4 -5
- data/docs/Mocha/ParameterMatchers/AnyOf.html +4 -5
- data/docs/Mocha/ParameterMatchers/AnyParameters.html +3 -3
- data/docs/Mocha/ParameterMatchers/Anything.html +3 -3
- data/docs/Mocha/ParameterMatchers/Base.html +8 -15
- data/docs/Mocha/ParameterMatchers/Equals.html +4 -5
- data/docs/Mocha/ParameterMatchers/EquivalentUri.html +3 -3
- data/docs/Mocha/ParameterMatchers/HasEntries.html +4 -5
- data/docs/Mocha/ParameterMatchers/HasEntry.html +4 -5
- data/docs/Mocha/ParameterMatchers/HasKey.html +4 -5
- data/docs/Mocha/ParameterMatchers/HasValue.html +4 -5
- data/docs/Mocha/ParameterMatchers/Includes.html +4 -5
- data/docs/Mocha/ParameterMatchers/InstanceOf.html +4 -5
- data/docs/Mocha/ParameterMatchers/IsA.html +3 -3
- data/docs/Mocha/ParameterMatchers/KindOf.html +4 -5
- data/docs/Mocha/ParameterMatchers/Not.html +4 -5
- data/docs/Mocha/ParameterMatchers/Optionally.html +3 -3
- data/docs/Mocha/ParameterMatchers/RegexpMatches.html +4 -5
- data/docs/Mocha/ParameterMatchers/RespondsWith.html +4 -5
- data/docs/Mocha/ParameterMatchers/YamlEquivalent.html +4 -5
- data/docs/Mocha/Sequence.html +3 -3
- data/docs/Mocha/StateMachine.html +13 -25
- data/docs/Mocha/StateMachine/State.html +4 -5
- data/docs/Mocha/StateMachine/StatePredicate.html +4 -5
- data/docs/Mocha/StubbingError.html +3 -3
- data/docs/_index.html +4 -22
- data/docs/class_list.html +1 -1
- data/docs/file.COPYING.html +3 -3
- data/docs/file.MIT-LICENSE.html +3 -3
- data/docs/file.README.html +18 -15
- data/docs/file.RELEASE.html +58 -3
- data/docs/frames.html +1 -1
- data/docs/index.html +18 -15
- data/docs/method_list.html +103 -39
- data/docs/top-level-namespace.html +3 -3
- data/gemfiles/Gemfile.minitest.5.11.3 +7 -0
- data/init.rb +1 -3
- data/lib/mocha.rb +8 -0
- data/lib/mocha/any_instance_method.rb +9 -25
- data/lib/mocha/api.rb +62 -66
- data/lib/mocha/cardinality.rb +26 -11
- data/lib/mocha/class_methods.rb +16 -15
- data/lib/mocha/configuration.rb +295 -67
- data/lib/mocha/detection/test_unit.rb +1 -3
- data/lib/mocha/exception_raiser.rb +2 -1
- data/lib/mocha/expectation.rb +56 -58
- data/lib/mocha/expectation_error.rb +1 -3
- data/lib/mocha/expectation_list.rb +6 -6
- data/lib/mocha/inspect.rb +28 -26
- data/lib/mocha/instance_method.rb +19 -2
- data/lib/mocha/integration.rb +1 -3
- data/lib/mocha/integration/mini_test.rb +7 -0
- data/lib/mocha/integration/test_unit.rb +7 -0
- data/lib/mocha/invocation.rb +61 -0
- data/lib/mocha/macos_version.rb +5 -0
- data/lib/mocha/minitest.rb +6 -1
- data/lib/mocha/mock.rb +46 -31
- data/lib/mocha/mockery.rb +28 -61
- data/lib/mocha/names.rb +1 -1
- data/lib/mocha/object_methods.rb +13 -19
- data/lib/mocha/parameter_matchers.rb +1 -1
- data/lib/mocha/parameter_matchers/all_of.rb +1 -1
- data/lib/mocha/parameter_matchers/any_of.rb +1 -1
- data/lib/mocha/parameter_matchers/equivalent_uri.rb +0 -9
- data/lib/mocha/parameter_matchers/includes.rb +2 -0
- data/lib/mocha/parameter_matchers/instance_methods.rb +18 -0
- data/lib/mocha/raised_exception.rb +11 -0
- data/lib/mocha/return_values.rb +3 -3
- data/lib/mocha/setup.rb +5 -0
- data/lib/mocha/single_return_value.rb +2 -1
- data/lib/mocha/singleton_class.rb +9 -0
- data/lib/mocha/{class_method.rb → stubbed_method.rb} +23 -43
- data/lib/mocha/test_unit.rb +6 -1
- data/lib/mocha/thrower.rb +2 -1
- data/lib/mocha/thrown_object.rb +12 -0
- data/lib/mocha/version.rb +1 -1
- data/mocha.gemspec +1 -3
- data/test/acceptance/acceptance_test_helper.rb +6 -0
- data/test/acceptance/bug_18914_test.rb +0 -1
- data/test/acceptance/bug_21465_test.rb +0 -1
- data/test/acceptance/bug_21563_test.rb +0 -1
- data/test/acceptance/display_matching_invocations_alongside_expectations_test.rb +69 -0
- data/test/acceptance/exception_rescue_test.rb +1 -2
- data/test/acceptance/expectations_on_multiple_methods_test.rb +0 -1
- data/test/acceptance/expected_invocation_count_test.rb +2 -3
- data/test/acceptance/failure_messages_test.rb +0 -1
- data/test/acceptance/issue_272_test.rb +1 -2
- data/test/acceptance/issue_65_test.rb +0 -1
- data/test/acceptance/issue_70_test.rb +0 -1
- data/test/acceptance/mocha_example_test.rb +0 -1
- data/test/acceptance/mocha_test_result_test.rb +0 -1
- data/test/acceptance/mock_test.rb +47 -6
- data/test/acceptance/mocked_methods_dispatch_test.rb +0 -1
- data/test/acceptance/multiple_expectations_failure_message_test.rb +0 -1
- data/test/acceptance/optional_parameters_test.rb +0 -1
- data/test/acceptance/parameter_matcher_test.rb +0 -1
- data/test/acceptance/partial_mocks_test.rb +0 -1
- data/test/acceptance/prepend_test.rb +0 -1
- data/test/acceptance/prevent_use_of_mocha_outside_test_test.rb +0 -1
- data/test/acceptance/raise_exception_test.rb +0 -1
- data/test/acceptance/return_value_test.rb +0 -1
- data/test/acceptance/sequence_test.rb +0 -1
- data/test/acceptance/states_test.rb +0 -1
- data/test/acceptance/stub_any_instance_method_defined_on_superclass_test.rb +1 -2
- data/test/acceptance/stub_any_instance_method_test.rb +20 -1
- data/test/acceptance/stub_class_method_defined_on_active_record_association_proxy_test.rb +0 -1
- data/test/acceptance/stub_class_method_defined_on_class_test.rb +0 -1
- data/test/acceptance/stub_class_method_defined_on_module_test.rb +0 -1
- data/test/acceptance/stub_class_method_defined_on_superclass_test.rb +1 -2
- data/test/acceptance/stub_everything_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_active_record_association_proxy_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_class_and_aliased_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_class_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_kernel_module_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_module_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_object_class_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_singleton_class_test.rb +0 -1
- data/test/acceptance/stub_instance_method_defined_on_superclass_test.rb +0 -1
- data/test/acceptance/stub_method_defined_on_module_and_aliased_test.rb +0 -1
- data/test/acceptance/stub_module_method_test.rb +0 -1
- data/test/acceptance/stub_test.rb +0 -1
- data/test/acceptance/stubba_example_test.rb +0 -1
- data/test/acceptance/stubba_test_result_test.rb +0 -1
- data/test/acceptance/stubbing_error_backtrace_test.rb +4 -5
- data/test/acceptance/stubbing_frozen_object_test.rb +0 -1
- data/test/acceptance/stubbing_method_accepting_block_parameter_test.rb +0 -1
- data/test/acceptance/stubbing_method_unnecessarily_test.rb +5 -5
- data/test/acceptance/stubbing_nil_test.rb +5 -5
- data/test/acceptance/stubbing_non_existent_any_instance_method_test.rb +11 -11
- data/test/acceptance/stubbing_non_existent_class_method_test.rb +11 -11
- data/test/acceptance/stubbing_non_existent_instance_method_test.rb +11 -11
- data/test/acceptance/stubbing_non_public_any_instance_method_test.rb +8 -8
- data/test/acceptance/stubbing_non_public_class_method_test.rb +9 -9
- data/test/acceptance/stubbing_non_public_instance_method_test.rb +9 -9
- data/test/acceptance/stubbing_on_non_mock_object_test.rb +5 -5
- data/test/acceptance/stubbing_same_class_method_on_parent_and_child_classes_test.rb +0 -1
- data/test/acceptance/throw_test.rb +0 -1
- data/test/acceptance/unexpected_invocation_test.rb +0 -1
- data/test/acceptance/unstubbing_test.rb +0 -1
- data/test/integration/shared_tests.rb +5 -3
- data/test/method_definer.rb +11 -17
- data/test/test_runner.rb +2 -0
- data/test/unit/any_instance_method_test.rb +41 -40
- data/test/unit/cardinality_test.rb +41 -23
- data/test/unit/central_test.rb +0 -1
- data/test/unit/class_methods_test.rb +1 -1
- data/test/unit/configuration_test.rb +12 -12
- data/test/unit/exception_raiser_test.rb +10 -5
- data/test/unit/expectation_list_test.rb +13 -11
- data/test/unit/expectation_test.rb +88 -103
- data/test/unit/instance_method_test.rb +282 -0
- data/test/unit/mock_test.rb +28 -19
- data/test/unit/mockery_test.rb +8 -11
- data/test/unit/module_methods_test.rb +2 -3
- data/test/unit/object_inspect_test.rb +6 -4
- data/test/unit/object_methods_test.rb +3 -2
- data/test/unit/parameter_matchers/equivalent_uri_test.rb +0 -9
- data/test/unit/parameter_matchers/has_entries_test.rb +1 -1
- data/test/unit/parameter_matchers/has_entry_test.rb +1 -1
- data/test/unit/parameter_matchers/has_key_test.rb +1 -1
- data/test/unit/parameter_matchers/has_value_test.rb +1 -1
- data/test/unit/parameter_matchers/includes_test.rb +1 -1
- data/test/unit/parameter_matchers/responds_with_test.rb +1 -1
- data/test/unit/return_values_test.rb +25 -20
- data/test/unit/single_return_value_test.rb +6 -1
- data/test/unit/thrower_test.rb +7 -2
- metadata +16 -30
- data/docs/Mocha/UnexpectedInvocation.html +0 -140
- data/lib/mocha/mini_test.rb +0 -5
- data/lib/mocha/module_method.rb +0 -6
- data/lib/mocha/module_methods.rb +0 -10
- data/lib/mocha/parameter_matchers/object.rb +0 -15
- data/lib/mocha/standalone.rb +0 -4
- data/lib/mocha/unexpected_invocation.rb +0 -24
- data/lib/mocha_standalone.rb +0 -4
- data/test/acceptance/mock_with_initializer_block_test.rb +0 -56
- data/test/unit/class_method_test.rb +0 -276
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::ObjectMethods
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.10.0.alpha
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -78,9 +78,7 @@
|
|
78
78
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
|
-
<dd>lib/mocha/object_methods.rb
|
82
|
-
lib/mocha/parameter_matchers/object.rb</span>
|
83
|
-
</dd>
|
81
|
+
<dd>lib/mocha/object_methods.rb</dd>
|
84
82
|
</dl>
|
85
83
|
|
86
84
|
</div>
|
@@ -88,11 +86,9 @@
|
|
88
86
|
<h2>Overview</h2><div class="docstring">
|
89
87
|
<div class="discussion">
|
90
88
|
|
91
|
-
<p>Methods added to all objects to allow mocking and stubbing on real (i.e.
|
92
|
-
non-mock) objects.</p>
|
89
|
+
<p>Methods added to all objects to allow mocking and stubbing on real (i.e. non-mock) objects.</p>
|
93
90
|
|
94
|
-
<p>Both <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> and <span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span> return an <span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span> which can be further
|
95
|
-
modified by methods on <span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
|
91
|
+
<p>Both <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> and <span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span> return an <span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span> which can be further modified by methods on <span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
|
96
92
|
|
97
93
|
|
98
94
|
</div>
|
@@ -133,8 +129,7 @@ modified by methods on <span class='object_link'><a href="Expectation.html" titl
|
|
133
129
|
|
134
130
|
|
135
131
|
<span class="summary_desc"><div class='inline'>
|
136
|
-
<p>Adds an expectation that the specified method must be called exactly once
|
137
|
-
with any parameters.</p>
|
132
|
+
<p>Adds an expectation that the specified method must be called exactly once with any parameters.</p>
|
138
133
|
</div></span>
|
139
134
|
|
140
135
|
</li>
|
@@ -158,8 +153,7 @@ with any parameters.</p>
|
|
158
153
|
|
159
154
|
|
160
155
|
<span class="summary_desc"><div class='inline'>
|
161
|
-
<p>Adds an expectation that the specified method may be called any number of
|
162
|
-
times with any parameters.</p>
|
156
|
+
<p>Adds an expectation that the specified method may be called any number of times with any parameters.</p>
|
163
157
|
</div></span>
|
164
158
|
|
165
159
|
</li>
|
@@ -183,8 +177,7 @@ times with any parameters.</p>
|
|
183
177
|
|
184
178
|
|
185
179
|
<span class="summary_desc"><div class='inline'>
|
186
|
-
<p>Removes the specified stubbed methods (added by calls to <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> or
|
187
|
-
<span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span>) and all expectations associated with them.</p>
|
180
|
+
<p>Removes the specified stubbed methods (added by calls to <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> or <span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span>) and all expectations associated with them.</p>
|
188
181
|
</div></span>
|
189
182
|
|
190
183
|
</li>
|
@@ -215,12 +208,9 @@ times with any parameters.</p>
|
|
215
208
|
</h3><div class="docstring">
|
216
209
|
<div class="discussion">
|
217
210
|
|
218
|
-
<p>Adds an expectation that the specified method must be called exactly once
|
219
|
-
with any parameters.</p>
|
211
|
+
<p>Adds an expectation that the specified method must be called exactly once with any parameters.</p>
|
220
212
|
|
221
|
-
<p>The original implementation of the method is replaced during the test and
|
222
|
-
then restored at the end of the test. The temporary replacement method has
|
223
|
-
the same visibility as the original method.</p>
|
213
|
+
<p>The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method.</p>
|
224
214
|
|
225
215
|
|
226
216
|
</div>
|
@@ -254,7 +244,21 @@ the same visibility as the original method.</p>
|
|
254
244
|
<span class='id identifier rubyid_product'>product</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='symbol'>:save</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span></code></pre>
|
255
245
|
|
256
246
|
</div>
|
257
|
-
|
247
|
+
|
248
|
+
<p class="tag_title">Overloads:</p>
|
249
|
+
<ul class="overload">
|
250
|
+
|
251
|
+
|
252
|
+
<li class="overload_item">
|
253
|
+
<span class="signature">#<strong>expects</strong>(method_name) ⇒ <tt><span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span></tt> </span>
|
254
|
+
<div class="docstring">
|
255
|
+
<div class="discussion">
|
256
|
+
|
257
|
+
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
<div class="tags">
|
261
|
+
<p class="tag_title">Parameters:</p>
|
258
262
|
<ul class="param">
|
259
263
|
|
260
264
|
<li>
|
@@ -273,6 +277,25 @@ the same visibility as the original method.</p>
|
|
273
277
|
|
274
278
|
</li>
|
275
279
|
|
280
|
+
</ul>
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</li>
|
285
|
+
|
286
|
+
|
287
|
+
<li class="overload_item">
|
288
|
+
<span class="signature">#<strong>expects</strong>(expected_methods_vs_return_values) ⇒ <tt><span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span></tt> </span>
|
289
|
+
<div class="docstring">
|
290
|
+
<div class="discussion">
|
291
|
+
|
292
|
+
|
293
|
+
</div>
|
294
|
+
</div>
|
295
|
+
<div class="tags">
|
296
|
+
<p class="tag_title">Parameters:</p>
|
297
|
+
<ul class="param">
|
298
|
+
|
276
299
|
<li>
|
277
300
|
|
278
301
|
<span class='name'>expected_methods_vs_return_values</span>
|
@@ -284,15 +307,19 @@ the same visibility as the original method.</p>
|
|
284
307
|
|
285
308
|
—
|
286
309
|
<div class='inline'>
|
287
|
-
<p>expected method name symbols as keys and corresponding return values as
|
288
|
-
values - these expectations are setup as if <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> were called multiple
|
289
|
-
times.</p>
|
310
|
+
<p>expected method name symbols as keys and corresponding return values as values - these expectations are setup as if <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> were called multiple times.</p>
|
290
311
|
</div>
|
291
312
|
|
292
313
|
</li>
|
293
314
|
|
294
315
|
</ul>
|
295
316
|
|
317
|
+
|
318
|
+
</div>
|
319
|
+
</li>
|
320
|
+
|
321
|
+
</ul>
|
322
|
+
|
296
323
|
<p class="tag_title">Returns:</p>
|
297
324
|
<ul class="return">
|
298
325
|
|
@@ -305,8 +332,7 @@ times.</p>
|
|
305
332
|
|
306
333
|
—
|
307
334
|
<div class='inline'>
|
308
|
-
<p>last-built expectation which can be further modified by methods on
|
309
|
-
<span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
|
335
|
+
<p>last-built expectation which can be further modified by methods on <span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
|
310
336
|
</div>
|
311
337
|
|
312
338
|
</li>
|
@@ -344,11 +370,6 @@ times.</p>
|
|
344
370
|
<pre class="lines">
|
345
371
|
|
346
372
|
|
347
|
-
66
|
348
|
-
67
|
349
|
-
68
|
350
|
-
69
|
351
|
-
70
|
352
373
|
71
|
353
374
|
72
|
354
375
|
73
|
@@ -363,10 +384,15 @@ times.</p>
|
|
363
384
|
82
|
364
385
|
83
|
365
386
|
84
|
366
|
-
85
|
387
|
+
85
|
388
|
+
86
|
389
|
+
87
|
390
|
+
88
|
391
|
+
89
|
392
|
+
90</pre>
|
367
393
|
</td>
|
368
394
|
<td>
|
369
|
-
<pre class="code"><span class="info file"># File 'lib/mocha/object_methods.rb', line
|
395
|
+
<pre class="code"><span class="info file"># File 'lib/mocha/object_methods.rb', line 71</span>
|
370
396
|
|
371
397
|
<span class='kw'>def</span> <span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='id identifier rubyid_expected_methods_vs_return_values'>expected_methods_vs_return_values</span><span class='rparen'>)</span>
|
372
398
|
<span class='kw'>if</span> <span class='id identifier rubyid_expected_methods_vs_return_values'>expected_methods_vs_return_values</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>the[^a-z]*spanish[^a-z]*inquisition</span><span class='regexp_end'>/i</span></span>
|
@@ -409,12 +435,9 @@ times.</p>
|
|
409
435
|
</h3><div class="docstring">
|
410
436
|
<div class="discussion">
|
411
437
|
|
412
|
-
<p>Adds an expectation that the specified method may be called any number of
|
413
|
-
times with any parameters.</p>
|
438
|
+
<p>Adds an expectation that the specified method may be called any number of times with any parameters.</p>
|
414
439
|
|
415
|
-
<p>The original implementation of the method is replaced during the test and
|
416
|
-
then restored at the end of the test. The temporary replacement method has
|
417
|
-
the same visibility as the original method.</p>
|
440
|
+
<p>The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method.</p>
|
418
441
|
|
419
442
|
|
420
443
|
</div>
|
@@ -448,7 +471,21 @@ the same visibility as the original method.</p>
|
|
448
471
|
<span class='id identifier rubyid_product'>product</span><span class='period'>.</span><span class='id identifier rubyid_stubs'>stubs</span><span class='lparen'>(</span><span class='symbol'>:save</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span></code></pre>
|
449
472
|
|
450
473
|
</div>
|
451
|
-
|
474
|
+
|
475
|
+
<p class="tag_title">Overloads:</p>
|
476
|
+
<ul class="overload">
|
477
|
+
|
478
|
+
|
479
|
+
<li class="overload_item">
|
480
|
+
<span class="signature">#<strong>stubs</strong>(method_name) ⇒ <tt><span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span></tt> </span>
|
481
|
+
<div class="docstring">
|
482
|
+
<div class="discussion">
|
483
|
+
|
484
|
+
|
485
|
+
</div>
|
486
|
+
</div>
|
487
|
+
<div class="tags">
|
488
|
+
<p class="tag_title">Parameters:</p>
|
452
489
|
<ul class="param">
|
453
490
|
|
454
491
|
<li>
|
@@ -467,6 +504,25 @@ the same visibility as the original method.</p>
|
|
467
504
|
|
468
505
|
</li>
|
469
506
|
|
507
|
+
</ul>
|
508
|
+
|
509
|
+
|
510
|
+
</div>
|
511
|
+
</li>
|
512
|
+
|
513
|
+
|
514
|
+
<li class="overload_item">
|
515
|
+
<span class="signature">#<strong>stubs</strong>(stubbed_methods_vs_return_values) ⇒ <tt><span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span></tt> </span>
|
516
|
+
<div class="docstring">
|
517
|
+
<div class="discussion">
|
518
|
+
|
519
|
+
|
520
|
+
</div>
|
521
|
+
</div>
|
522
|
+
<div class="tags">
|
523
|
+
<p class="tag_title">Parameters:</p>
|
524
|
+
<ul class="param">
|
525
|
+
|
470
526
|
<li>
|
471
527
|
|
472
528
|
<span class='name'>stubbed_methods_vs_return_values</span>
|
@@ -478,15 +534,19 @@ the same visibility as the original method.</p>
|
|
478
534
|
|
479
535
|
—
|
480
536
|
<div class='inline'>
|
481
|
-
<p>stubbed method name symbols as keys and corresponding return values as
|
482
|
-
values - these stubbed methods are setup as if <span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span> were called
|
483
|
-
multiple times.</p>
|
537
|
+
<p>stubbed method name symbols as keys and corresponding return values as values - these stubbed methods are setup as if <span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span> were called multiple times.</p>
|
484
538
|
</div>
|
485
539
|
|
486
540
|
</li>
|
487
541
|
|
488
542
|
</ul>
|
489
543
|
|
544
|
+
|
545
|
+
</div>
|
546
|
+
</li>
|
547
|
+
|
548
|
+
</ul>
|
549
|
+
|
490
550
|
<p class="tag_title">Returns:</p>
|
491
551
|
<ul class="return">
|
492
552
|
|
@@ -499,8 +559,7 @@ multiple times.</p>
|
|
499
559
|
|
500
560
|
—
|
501
561
|
<div class='inline'>
|
502
|
-
<p>last-built expectation which can be further modified by methods on
|
503
|
-
<span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
|
562
|
+
<p>last-built expectation which can be further modified by methods on <span class='object_link'><a href="Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
|
504
563
|
</div>
|
505
564
|
|
506
565
|
</li>
|
@@ -538,11 +597,6 @@ multiple times.</p>
|
|
538
597
|
<pre class="lines">
|
539
598
|
|
540
599
|
|
541
|
-
115
|
542
|
-
116
|
543
|
-
117
|
544
|
-
118
|
545
|
-
119
|
546
600
|
120
|
547
601
|
121
|
548
602
|
122
|
@@ -554,10 +608,15 @@ multiple times.</p>
|
|
554
608
|
128
|
555
609
|
129
|
556
610
|
130
|
557
|
-
131
|
611
|
+
131
|
612
|
+
132
|
613
|
+
133
|
614
|
+
134
|
615
|
+
135
|
616
|
+
136</pre>
|
558
617
|
</td>
|
559
618
|
<td>
|
560
|
-
<pre class="code"><span class="info file"># File 'lib/mocha/object_methods.rb', line
|
619
|
+
<pre class="code"><span class="info file"># File 'lib/mocha/object_methods.rb', line 120</span>
|
561
620
|
|
562
621
|
<span class='kw'>def</span> <span class='id identifier rubyid_stubs'>stubs</span><span class='lparen'>(</span><span class='id identifier rubyid_stubbed_methods_vs_return_values'>stubbed_methods_vs_return_values</span><span class='rparen'>)</span>
|
563
622
|
<span class='kw'>if</span> <span class='id identifier rubyid_frozen?'>frozen?</span>
|
@@ -593,17 +652,11 @@ multiple times.</p>
|
|
593
652
|
</h3><div class="docstring">
|
594
653
|
<div class="discussion">
|
595
654
|
|
596
|
-
<p>Removes the specified stubbed methods (added by calls to <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> or
|
597
|
-
<span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span>) and all expectations associated with them.</p>
|
655
|
+
<p>Removes the specified stubbed methods (added by calls to <span class='object_link'><a href="#expects-instance_method" title="Mocha::ObjectMethods#expects (method)">#expects</a></span> or <span class='object_link'><a href="#stubs-instance_method" title="Mocha::ObjectMethods#stubs (method)">#stubs</a></span>) and all expectations associated with them.</p>
|
598
656
|
|
599
|
-
<p>Restores the original behaviour of the methods before they were stubbed.
|
600
|
-
This is normally done automatically at the end of each test, but in some
|
601
|
-
circumstances you may want to do it <strong>before</strong> the end of the
|
602
|
-
test.</p>
|
657
|
+
<p>Restores the original behaviour of the methods before they were stubbed. This is normally done automatically at the end of each test, but in some circumstances you may want to do it <strong>before</strong> the end of the test.</p>
|
603
658
|
|
604
|
-
<p>WARNING: If you <span class='object_link'><a href="#unstub-instance_method" title="Mocha::ObjectMethods#unstub (method)">#unstub</a></span> a method which still has unsatisfied
|
605
|
-
expectations, you may be removing the only way those expectations can be
|
606
|
-
satisfied. Use <span class='object_link'><a href="#unstub-instance_method" title="Mocha::ObjectMethods#unstub (method)">#unstub</a></span> with care.</p>
|
659
|
+
<p>WARNING: If you <span class='object_link'><a href="#unstub-instance_method" title="Mocha::ObjectMethods#unstub (method)">#unstub</a></span> a method which still has unsatisfied expectations, you may be removing the only way those expectations can be satisfied. Use <span class='object_link'><a href="#unstub-instance_method" title="Mocha::ObjectMethods#unstub (method)">#unstub</a></span> with care.</p>
|
607
660
|
|
608
661
|
|
609
662
|
</div>
|
@@ -666,16 +719,16 @@ satisfied. Use <span class='object_link'><a href="#unstub-instance_method" title
|
|
666
719
|
<pre class="lines">
|
667
720
|
|
668
721
|
|
669
|
-
156
|
670
|
-
157
|
671
|
-
158
|
672
|
-
159
|
673
|
-
160
|
674
722
|
161
|
675
|
-
162
|
723
|
+
162
|
724
|
+
163
|
725
|
+
164
|
726
|
+
165
|
727
|
+
166
|
728
|
+
167</pre>
|
676
729
|
</td>
|
677
730
|
<td>
|
678
|
-
<pre class="code"><span class="info file"># File 'lib/mocha/object_methods.rb', line
|
731
|
+
<pre class="code"><span class="info file"># File 'lib/mocha/object_methods.rb', line 161</span>
|
679
732
|
|
680
733
|
<span class='kw'>def</span> <span class='id identifier rubyid_unstub'>unstub</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_method_names'>method_names</span><span class='rparen'>)</span>
|
681
734
|
<span class='id identifier rubyid_mockery'>mockery</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span><span class='op'>::</span><span class='const'>Mockery</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
@@ -702,9 +755,9 @@ satisfied. Use <span class='object_link'><a href="#unstub-instance_method" title
|
|
702
755
|
</div>
|
703
756
|
|
704
757
|
<div id="footer">
|
705
|
-
Generated on
|
758
|
+
Generated on Sun Nov 24 15:26:49 2019 by
|
706
759
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
707
|
-
0.9.
|
760
|
+
0.9.20 (ruby-2.6.5).
|
708
761
|
</div>
|
709
762
|
|
710
763
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::ParameterMatchers
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.10.0.alpha
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -84,7 +84,7 @@
|
|
84
84
|
<dl>
|
85
85
|
<dt>Defined in:</dt>
|
86
86
|
<dd>lib/mocha/parameter_matchers.rb<span class="defines">,<br />
|
87
|
-
lib/mocha/parameter_matchers/not.rb,<br /> lib/mocha/parameter_matchers/base.rb,<br /> lib/mocha/parameter_matchers/is_a.rb,<br /> lib/mocha/parameter_matchers/all_of.rb,<br /> lib/mocha/parameter_matchers/any_of.rb,<br /> lib/mocha/parameter_matchers/equals.rb,<br /> lib/mocha/parameter_matchers/has_key.rb,<br /> lib/mocha/parameter_matchers/kind_of.rb,<br /> lib/mocha/parameter_matchers/anything.rb,<br /> lib/mocha/parameter_matchers/includes.rb,<br /> lib/mocha/parameter_matchers/has_entry.rb,<br /> lib/mocha/parameter_matchers/has_value.rb,<br /> lib/mocha/parameter_matchers/optionally.rb,<br /> lib/mocha/parameter_matchers/has_entries.rb,<br /> lib/mocha/parameter_matchers/instance_of.rb,<br /> lib/mocha/parameter_matchers/responds_with.rb,<br /> lib/mocha/parameter_matchers/any_parameters.rb,<br /> lib/mocha/parameter_matchers/equivalent_uri.rb,<br /> lib/mocha/parameter_matchers/regexp_matches.rb,<br /> lib/mocha/parameter_matchers/yaml_equivalent.rb</span>
|
87
|
+
lib/mocha/parameter_matchers/not.rb,<br /> lib/mocha/parameter_matchers/base.rb,<br /> lib/mocha/parameter_matchers/is_a.rb,<br /> lib/mocha/parameter_matchers/all_of.rb,<br /> lib/mocha/parameter_matchers/any_of.rb,<br /> lib/mocha/parameter_matchers/equals.rb,<br /> lib/mocha/parameter_matchers/has_key.rb,<br /> lib/mocha/parameter_matchers/kind_of.rb,<br /> lib/mocha/parameter_matchers/anything.rb,<br /> lib/mocha/parameter_matchers/includes.rb,<br /> lib/mocha/parameter_matchers/has_entry.rb,<br /> lib/mocha/parameter_matchers/has_value.rb,<br /> lib/mocha/parameter_matchers/optionally.rb,<br /> lib/mocha/parameter_matchers/has_entries.rb,<br /> lib/mocha/parameter_matchers/instance_of.rb,<br /> lib/mocha/parameter_matchers/responds_with.rb,<br /> lib/mocha/parameter_matchers/any_parameters.rb,<br /> lib/mocha/parameter_matchers/equivalent_uri.rb,<br /> lib/mocha/parameter_matchers/regexp_matches.rb,<br /> lib/mocha/parameter_matchers/yaml_equivalent.rb,<br /> lib/mocha/parameter_matchers/instance_methods.rb</span>
|
88
88
|
</dd>
|
89
89
|
</dl>
|
90
90
|
|
@@ -93,8 +93,7 @@
|
|
93
93
|
<h2>Overview</h2><div class="docstring">
|
94
94
|
<div class="discussion">
|
95
95
|
|
96
|
-
<p>Used as parameters for <span class='object_link'><a href="Expectation.html#with-instance_method" title="Mocha::Expectation#with (method)">Expectation#with</a></span> to restrict the parameter values
|
97
|
-
which will match the expectation. Can be nested.</p>
|
96
|
+
<p>Used as parameters for <span class='object_link'><a href="Expectation.html#with-instance_method" title="Mocha::Expectation#with (method)">Expectation#with</a></span> to restrict the parameter values which will match the expectation. Can be nested.</p>
|
98
97
|
|
99
98
|
|
100
99
|
</div>
|
@@ -265,8 +264,7 @@ which will match the expectation. Can be nested.</p>
|
|
265
264
|
|
266
265
|
|
267
266
|
<span class="summary_desc"><div class='inline'>
|
268
|
-
<p>Matches a URI without regard to the ordering of parameters in the query
|
269
|
-
string.</p>
|
267
|
+
<p>Matches a URI without regard to the ordering of parameters in the query string.</p>
|
270
268
|
</div></span>
|
271
269
|
|
272
270
|
</li>
|
@@ -314,32 +312,7 @@ string.</p>
|
|
314
312
|
|
315
313
|
|
316
314
|
<span class="summary_desc"><div class='inline'>
|
317
|
-
<p>Matches <code>Hash</code> containing entry with <code>key</code> and
|
318
|
-
<code>value</code>.</p>
|
319
|
-
</div></span>
|
320
|
-
|
321
|
-
</li>
|
322
|
-
|
323
|
-
|
324
|
-
<li class="public deprecated">
|
325
|
-
<span class="summary_signature">
|
326
|
-
|
327
|
-
<a href="#has_equivalent_query_string-instance_method" title="#has_equivalent_query_string (instance method)">#<strong>has_equivalent_query_string</strong>(uri) ⇒ Object </a>
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
</span>
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
<span class="deprecated note title">deprecated</span>
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
<span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'>
|
342
|
-
<p>Use <span class='object_link'><a href="#equivalent_uri-instance_method" title="Mocha::ParameterMatchers#equivalent_uri (method)">#equivalent_uri</a></span> instead.</p>
|
315
|
+
<p>Matches <code>Hash</code> containing entry with <code>key</code> and <code>value</code>.</p>
|
343
316
|
</div></span>
|
344
317
|
|
345
318
|
</li>
|
@@ -411,8 +384,7 @@ string.</p>
|
|
411
384
|
|
412
385
|
|
413
386
|
<span class="summary_desc"><div class='inline'>
|
414
|
-
<p>Matches any object that responds with <code>true</code> to <tt>include?(item)</tt>
|
415
|
-
for all items.</p>
|
387
|
+
<p>Matches any object that responds with <code>true</code> to <tt>include?(item)</tt> for all items.</p>
|
416
388
|
</div></span>
|
417
389
|
|
418
390
|
</li>
|
@@ -580,8 +552,7 @@ for all items.</p>
|
|
580
552
|
|
581
553
|
|
582
554
|
<span class="summary_desc"><div class='inline'>
|
583
|
-
<p>Matches any object that responds to <code>message</code> with
|
584
|
-
<code>result</code>.</p>
|
555
|
+
<p>Matches any object that responds to <code>message</code> with <code>result</code>.</p>
|
585
556
|
</div></span>
|
586
557
|
|
587
558
|
</li>
|
@@ -668,7 +639,7 @@ for all items.</p>
|
|
668
639
|
|
669
640
|
<li>
|
670
641
|
|
671
|
-
<span class='name'>
|
642
|
+
<span class='name'>matchers</span>
|
672
643
|
|
673
644
|
|
674
645
|
<span class='type'>(<tt>*Array<<span class='object_link'><a href="ParameterMatchers/Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span>></tt>)</span>
|
@@ -789,7 +760,7 @@ for all items.</p>
|
|
789
760
|
|
790
761
|
<li>
|
791
762
|
|
792
|
-
<span class='name'>
|
763
|
+
<span class='name'>matchers</span>
|
793
764
|
|
794
765
|
|
795
766
|
<span class='type'>(<tt>*Array<<span class='object_link'><a href="ParameterMatchers/Base.html" title="Mocha::ParameterMatchers::Base (class)">Base</a></span>></tt>)</span>
|
@@ -864,8 +835,7 @@ for all items.</p>
|
|
864
835
|
</h3><div class="docstring">
|
865
836
|
<div class="discussion">
|
866
837
|
|
867
|
-
<p>Matches any parameters. This is used as the default for a newly built
|
868
|
-
expectation.</p>
|
838
|
+
<p>Matches any parameters. This is used as the default for a newly built expectation.</p>
|
869
839
|
|
870
840
|
|
871
841
|
</div>
|
@@ -1147,8 +1117,7 @@ expectation.</p>
|
|
1147
1117
|
</h3><div class="docstring">
|
1148
1118
|
<div class="discussion">
|
1149
1119
|
|
1150
|
-
<p>Matches a URI without regard to the ordering of parameters in the query
|
1151
|
-
string.</p>
|
1120
|
+
<p>Matches a URI without regard to the ordering of parameters in the query string.</p>
|
1152
1121
|
|
1153
1122
|
|
1154
1123
|
</div>
|
@@ -1376,8 +1345,7 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1376
1345
|
</h3><div class="docstring">
|
1377
1346
|
<div class="discussion">
|
1378
1347
|
|
1379
|
-
<p>Matches <code>Hash</code> containing entry with <code>key</code> and
|
1380
|
-
<code>value</code>.</p>
|
1348
|
+
<p>Matches <code>Hash</code> containing entry with <code>key</code> and <code>value</code>.</p>
|
1381
1349
|
|
1382
1350
|
<p>rubocop:disable Naming/PredicateName</p>
|
1383
1351
|
|
@@ -1401,8 +1369,7 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1401
1369
|
|
1402
1370
|
|
1403
1371
|
<p class="example_title"><div class='inline'>
|
1404
|
-
<p>Actual parameter contains expected entry supplied as <code>Hash</code>
|
1405
|
-
entry.</p>
|
1372
|
+
<p>Actual parameter contains expected entry supplied as <code>Hash</code> entry.</p>
|
1406
1373
|
</div></p>
|
1407
1374
|
|
1408
1375
|
<pre class="example code"><code><span class='id identifier rubyid_object'>object</span> <span class='op'>=</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
@@ -1422,8 +1389,7 @@ entry.</p>
|
|
1422
1389
|
|
1423
1390
|
|
1424
1391
|
<p class="example_title"><div class='inline'>
|
1425
|
-
<p>Actual parameter does not contain expected entry supplied as
|
1426
|
-
<code>Hash</code> entry.</p>
|
1392
|
+
<p>Actual parameter does not contain expected entry supplied as <code>Hash</code> entry.</p>
|
1427
1393
|
</div></p>
|
1428
1394
|
|
1429
1395
|
<pre class="example code"><code>
|
@@ -1628,54 +1594,6 @@ entry.</p>
|
|
1628
1594
|
</td>
|
1629
1595
|
</tr>
|
1630
1596
|
</table>
|
1631
|
-
</div>
|
1632
|
-
|
1633
|
-
<div class="method_details ">
|
1634
|
-
<h3 class="signature " id="has_equivalent_query_string-instance_method">
|
1635
|
-
|
1636
|
-
#<strong>has_equivalent_query_string</strong>(uri) ⇒ <tt><span class='object_link'>Object</span></tt>
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
</h3><div class="docstring">
|
1643
|
-
<div class="discussion">
|
1644
|
-
<div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'>
|
1645
|
-
<p>Use <span class='object_link'><a href="#equivalent_uri-instance_method" title="Mocha::ParameterMatchers#equivalent_uri (method)">#equivalent_uri</a></span> instead.</p>
|
1646
|
-
</div></div>
|
1647
|
-
|
1648
|
-
<p>rubocop:disable Naming/PredicateName</p>
|
1649
|
-
|
1650
|
-
|
1651
|
-
</div>
|
1652
|
-
</div>
|
1653
|
-
<div class="tags">
|
1654
|
-
|
1655
|
-
|
1656
|
-
</div><table class="source_code">
|
1657
|
-
<tr>
|
1658
|
-
<td>
|
1659
|
-
<pre class="lines">
|
1660
|
-
|
1661
|
-
|
1662
|
-
32
|
1663
|
-
33
|
1664
|
-
34
|
1665
|
-
35
|
1666
|
-
36</pre>
|
1667
|
-
</td>
|
1668
|
-
<td>
|
1669
|
-
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/equivalent_uri.rb', line 32</span>
|
1670
|
-
|
1671
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_equivalent_query_string'>has_equivalent_query_string</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span>
|
1672
|
-
<span class='const'><span class='object_link'><a href="../Mocha.html" title="Mocha (module)">Mocha</a></span></span><span class='op'>::</span><span class='const'>Deprecation</span><span class='period'>.</span><span class='id identifier rubyid_warning'>warning</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>`has_equivalent_query_string` is deprecated. Please use `equivalent_uri` instead.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1673
|
-
|
1674
|
-
<span class='id identifier rubyid_equivalent_uri'>equivalent_uri</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span>
|
1675
|
-
<span class='kw'>end</span></pre>
|
1676
|
-
</td>
|
1677
|
-
</tr>
|
1678
|
-
</table>
|
1679
1597
|
</div>
|
1680
1598
|
|
1681
1599
|
<div class="method_details ">
|
@@ -1916,8 +1834,7 @@ entry.</p>
|
|
1916
1834
|
</h3><div class="docstring">
|
1917
1835
|
<div class="discussion">
|
1918
1836
|
|
1919
|
-
<p>Matches any object that responds with <code>true</code> to <tt>include?(item)</tt>
|
1920
|
-
for all items.</p>
|
1837
|
+
<p>Matches any object that responds with <code>true</code> to <tt>include?(item)</tt> for all items.</p>
|
1921
1838
|
|
1922
1839
|
|
1923
1840
|
</div>
|
@@ -2564,8 +2481,7 @@ for all items.</p>
|
|
2564
2481
|
|
2565
2482
|
|
2566
2483
|
<p class="example_title"><div class='inline'>
|
2567
|
-
<p>Only the two required parameters are supplied and they both match their
|
2568
|
-
expected value.</p>
|
2484
|
+
<p>Only the two required parameters are supplied and they both match their expected value.</p>
|
2569
2485
|
</div></p>
|
2570
2486
|
|
2571
2487
|
<pre class="example code"><code><span class='id identifier rubyid_object'>object</span> <span class='op'>=</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
@@ -2575,8 +2491,7 @@ expected value.</p>
|
|
2575
2491
|
|
2576
2492
|
|
2577
2493
|
<p class="example_title"><div class='inline'>
|
2578
|
-
<p>Both required parameters and one of the optional parameters are supplied
|
2579
|
-
and they all match their expected value.</p>
|
2494
|
+
<p>Both required parameters and one of the optional parameters are supplied and they all match their expected value.</p>
|
2580
2495
|
</div></p>
|
2581
2496
|
|
2582
2497
|
<pre class="example code"><code><span class='id identifier rubyid_object'>object</span> <span class='op'>=</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
@@ -2586,8 +2501,7 @@ and they all match their expected value.</p>
|
|
2586
2501
|
|
2587
2502
|
|
2588
2503
|
<p class="example_title"><div class='inline'>
|
2589
|
-
<p>Both required parameters and both of the optional parameters are supplied
|
2590
|
-
and they all match their expected value.</p>
|
2504
|
+
<p>Both required parameters and both of the optional parameters are supplied and they all match their expected value.</p>
|
2591
2505
|
</div></p>
|
2592
2506
|
|
2593
2507
|
<pre class="example code"><code><span class='id identifier rubyid_object'>object</span> <span class='op'>=</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
@@ -2798,9 +2712,7 @@ and they all match their expected value.</p>
|
|
2798
2712
|
</h3><div class="docstring">
|
2799
2713
|
<div class="discussion">
|
2800
2714
|
|
2801
|
-
<p>Matches any object that responds to <code>message</code> with
|
2802
|
-
<code>result</code>. To put it another way, it tests the quack, not the
|
2803
|
-
duck.</p>
|
2715
|
+
<p>Matches any object that responds to <code>message</code> with <code>result</code>. To put it another way, it tests the quack, not the duck.</p>
|
2804
2716
|
|
2805
2717
|
|
2806
2718
|
</div>
|
@@ -3039,9 +2951,9 @@ duck.</p>
|
|
3039
2951
|
</div>
|
3040
2952
|
|
3041
2953
|
<div id="footer">
|
3042
|
-
Generated on
|
2954
|
+
Generated on Sun Nov 24 15:26:49 2019 by
|
3043
2955
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
3044
|
-
0.9.
|
2956
|
+
0.9.20 (ruby-2.6.5).
|
3045
2957
|
</div>
|
3046
2958
|
|
3047
2959
|
</div>
|