mocha 1.10.0 → 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.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.yardopts +1 -0
- data/RELEASE.md +49 -0
- data/Rakefile +1 -4
- data/docs/Mocha.html +2 -2
- data/docs/Mocha/API.html +167 -35
- data/docs/Mocha/ClassMethods.html +2 -2
- data/docs/Mocha/Configuration.html +197 -55
- data/docs/Mocha/Expectation.html +284 -76
- 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 +14 -41
- 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 +74 -2
- data/docs/frames.html +1 -1
- data/docs/index.html +2 -2
- data/docs/method_list.html +51 -27
- data/docs/top-level-namespace.html +2 -2
- data/lib/mocha/api.rb +83 -19
- data/lib/mocha/block_matcher.rb +31 -0
- data/lib/mocha/configuration.rb +57 -1
- data/lib/mocha/deprecation.rb +2 -1
- data/lib/mocha/expectation.rb +48 -7
- data/lib/mocha/invocation.rb +20 -4
- data/lib/mocha/mock.rb +42 -16
- data/lib/mocha/mockery.rb +14 -14
- 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/lib/mocha/yield_parameters.rb +5 -11
- data/test/acceptance/acceptance_test_helper.rb +1 -0
- data/test/acceptance/display_matching_invocations_alongside_expectations_test.rb +5 -5
- data/test/acceptance/failure_messages_test.rb +16 -0
- data/test/acceptance/issue_457_test.rb +31 -0
- data/test/acceptance/mocha_example_test.rb +11 -1
- data/test/acceptance/mock_built_with_first_argument_type_being_string_test.rb +98 -0
- data/test/acceptance/mock_test.rb +64 -12
- data/test/acceptance/multiple_yielding_test.rb +59 -0
- data/test/acceptance/stubba_example_test.rb +11 -1
- data/test/acceptance/stubbing_non_existent_any_instance_method_test.rb +16 -0
- data/test/acceptance/yielding_test.rb +80 -0
- data/test/unit/expectation_test.rb +30 -3
- data/test/unit/yield_parameters_test.rb +35 -53
- metadata +8 -9
- data/lib/mocha/multiple_yields.rb +0 -15
- data/lib/mocha/no_yields.rb +0 -5
- data/lib/mocha/pretty_parameters.rb +0 -24
- data/lib/mocha/single_yield.rb +0 -13
- data/test/unit/multiple_yields_test.rb +0 -16
- data/test/unit/no_yields_test.rb +0 -16
- data/test/unit/single_yield_test.rb +0 -16
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: Mocha::ExpectationError
|
8
8
|
|
9
|
-
— Mocha 1.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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'>
|
380
|
-
<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='rparen'>)</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>
|
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
|
-
<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='
|
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='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</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>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::ObjectMethods
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -755,7 +755,7 @@
|
|
755
755
|
</div>
|
756
756
|
|
757
757
|
<div id="footer">
|
758
|
-
Generated on
|
758
|
+
Generated on Sat Jan 4 17:36:47 2020 by
|
759
759
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
760
760
|
0.9.20 (ruby-2.6.5).
|
761
761
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Mocha::ParameterMatchers
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -1230,8 +1230,6 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1230
1230
|
|
1231
1231
|
<p>Matches <code>Hash</code> containing all <code>entries</code>.</p>
|
1232
1232
|
|
1233
|
-
<p>rubocop:disable Naming/PredicateName</p>
|
1234
|
-
|
1235
1233
|
|
1236
1234
|
</div>
|
1237
1235
|
</div>
|
@@ -1321,8 +1319,8 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1321
1319
|
<td>
|
1322
1320
|
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/has_entries.rb', line 26</span>
|
1323
1321
|
|
1324
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_entries'>has_entries</span><span class='lparen'>(</span><span class='id identifier rubyid_entries'>entries</span><span class='rparen'>)</span>
|
1325
|
-
<span class='const'><span class='object_link'><a href="ParameterMatchers/HasEntries.html" title="Mocha::ParameterMatchers::HasEntries (class)">HasEntries</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_entries'>entries</span><span class='rparen'>)</span>
|
1322
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_entries'>has_entries</span><span class='lparen'>(</span><span class='id identifier rubyid_entries'>entries</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/PredicateName
|
1323
|
+
</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/HasEntries.html" title="Mocha::ParameterMatchers::HasEntries (class)">HasEntries</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_entries'>entries</span><span class='rparen'>)</span>
|
1326
1324
|
<span class='kw'>end</span></pre>
|
1327
1325
|
</td>
|
1328
1326
|
</tr>
|
@@ -1347,8 +1345,6 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1347
1345
|
|
1348
1346
|
<p>Matches <code>Hash</code> containing entry with <code>key</code> and <code>value</code>.</p>
|
1349
1347
|
|
1350
|
-
<p>rubocop:disable Naming/PredicateName</p>
|
1351
|
-
|
1352
1348
|
|
1353
1349
|
</div>
|
1354
1350
|
</div>
|
@@ -1568,8 +1564,8 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1568
1564
|
<td>
|
1569
1565
|
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/has_entry.rb', line 43</span>
|
1570
1566
|
|
1571
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_entry'>has_entry</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1572
|
-
<span class='kw'>case</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
1567
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_entry'>has_entry</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/PredicateName
|
1568
|
+
</span> <span class='kw'>case</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
1573
1569
|
<span class='kw'>when</span> <span class='int'>1</span>
|
1574
1570
|
<span class='kw'>case</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
1575
1571
|
<span class='kw'>when</span> <span class='const'>Hash</span>
|
@@ -1610,8 +1606,6 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1610
1606
|
|
1611
1607
|
<p>Matches <code>Hash</code> containing <code>key</code>.</p>
|
1612
1608
|
|
1613
|
-
<p>rubocop:disable Naming/PredicateName</p>
|
1614
|
-
|
1615
1609
|
|
1616
1610
|
</div>
|
1617
1611
|
</div>
|
@@ -1701,8 +1695,8 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1701
1695
|
<td>
|
1702
1696
|
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/has_key.rb', line 24</span>
|
1703
1697
|
|
1704
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_key'>has_key</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
1705
|
-
<span class='const'><span class='object_link'><a href="ParameterMatchers/HasKey.html" title="Mocha::ParameterMatchers::HasKey (class)">HasKey</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
1698
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_key'>has_key</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/PredicateName
|
1699
|
+
</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/HasKey.html" title="Mocha::ParameterMatchers::HasKey (class)">HasKey</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
1706
1700
|
<span class='kw'>end</span></pre>
|
1707
1701
|
</td>
|
1708
1702
|
</tr>
|
@@ -1723,8 +1717,6 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1723
1717
|
|
1724
1718
|
<p>Matches <code>Hash</code> containing <code>value</code>.</p>
|
1725
1719
|
|
1726
|
-
<p>rubocop:disable Naming/PredicateName</p>
|
1727
|
-
|
1728
1720
|
|
1729
1721
|
</div>
|
1730
1722
|
</div>
|
@@ -1814,8 +1806,8 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
1814
1806
|
<td>
|
1815
1807
|
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/has_value.rb', line 24</span>
|
1816
1808
|
|
1817
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_value'>has_value</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
1818
|
-
<span class='const'><span class='object_link'><a href="ParameterMatchers/HasValue.html" title="Mocha::ParameterMatchers::HasValue (class)">HasValue</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
1809
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_has_value'>has_value</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/PredicateName
|
1810
|
+
</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/HasValue.html" title="Mocha::ParameterMatchers::HasValue (class)">HasValue</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
1819
1811
|
<span class='kw'>end</span></pre>
|
1820
1812
|
</td>
|
1821
1813
|
</tr>
|
@@ -2130,8 +2122,6 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
2130
2122
|
|
2131
2123
|
<p>Matches any object that is a <code>klass</code>.</p>
|
2132
2124
|
|
2133
|
-
<p>rubocop:disable Naming/PredicateName</p>
|
2134
|
-
|
2135
2125
|
|
2136
2126
|
</div>
|
2137
2127
|
</div>
|
@@ -2223,8 +2213,8 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
2223
2213
|
<td>
|
2224
2214
|
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/is_a.rb', line 25</span>
|
2225
2215
|
|
2226
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_is_a'>is_a</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
|
2227
|
-
<span class='const'><span class='object_link'><a href="ParameterMatchers/IsA.html" title="Mocha::ParameterMatchers::IsA (class)">IsA</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
|
2216
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_is_a'>is_a</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/PredicateName
|
2217
|
+
</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/IsA.html" title="Mocha::ParameterMatchers::IsA (class)">IsA</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_klass'>klass</span><span class='rparen'>)</span>
|
2228
2218
|
<span class='kw'>end</span></pre>
|
2229
2219
|
</td>
|
2230
2220
|
</tr>
|
@@ -2358,8 +2348,6 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
2358
2348
|
|
2359
2349
|
<p>Matches if <code>matcher</code> does <strong>not</strong> match.</p>
|
2360
2350
|
|
2361
|
-
<p>rubocop:disable Naming/MethodName</p>
|
2362
|
-
|
2363
2351
|
|
2364
2352
|
</div>
|
2365
2353
|
</div>
|
@@ -2449,8 +2437,8 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
2449
2437
|
<td>
|
2450
2438
|
<pre class="code"><span class="info file"># File 'lib/mocha/parameter_matchers/not.rb', line 24</span>
|
2451
2439
|
|
2452
|
-
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/Not.html" title="Mocha::ParameterMatchers::Not (class)">Not</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_matcher'>matcher</span><span class='rparen'>)</span>
|
2453
|
-
<span class='const'><span class='object_link'><a href="ParameterMatchers/Not.html" title="Mocha::ParameterMatchers::Not (class)">Not</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_matcher'>matcher</span><span class='rparen'>)</span>
|
2440
|
+
<span class='kw'>def</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/Not.html" title="Mocha::ParameterMatchers::Not (class)">Not</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_matcher'>matcher</span><span class='rparen'>)</span> <span class='comment'># rubocop:disable Naming/MethodName
|
2441
|
+
</span> <span class='const'><span class='object_link'><a href="ParameterMatchers/Not.html" title="Mocha::ParameterMatchers::Not (class)">Not</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_matcher'>matcher</span><span class='rparen'>)</span>
|
2454
2442
|
<span class='kw'>end</span></pre>
|
2455
2443
|
</td>
|
2456
2444
|
</tr>
|
@@ -2951,7 +2939,7 @@ object.method_1('http://example.com/foo?a=1&b=3')
|
|
2951
2939
|
</div>
|
2952
2940
|
|
2953
2941
|
<div id="footer">
|
2954
|
-
Generated on
|
2942
|
+
Generated on Sat Jan 4 17:36:47 2020 by
|
2955
2943
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2956
2944
|
0.9.20 (ruby-2.6.5).
|
2957
2945
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Mocha::ParameterMatchers::AllOf
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -143,7 +143,7 @@
|
|
143
143
|
</div>
|
144
144
|
|
145
145
|
<div id="footer">
|
146
|
-
Generated on
|
146
|
+
Generated on Sat Jan 4 17:36:48 2020 by
|
147
147
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
148
148
|
0.9.20 (ruby-2.6.5).
|
149
149
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Mocha::ParameterMatchers::AnyOf
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -143,7 +143,7 @@
|
|
143
143
|
</div>
|
144
144
|
|
145
145
|
<div id="footer">
|
146
|
-
Generated on
|
146
|
+
Generated on Sat Jan 4 17:36:48 2020 by
|
147
147
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
148
148
|
0.9.20 (ruby-2.6.5).
|
149
149
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Mocha::ParameterMatchers::AnyParameters
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -143,7 +143,7 @@
|
|
143
143
|
</div>
|
144
144
|
|
145
145
|
<div id="footer">
|
146
|
-
Generated on
|
146
|
+
Generated on Sat Jan 4 17:36:48 2020 by
|
147
147
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
148
148
|
0.9.20 (ruby-2.6.5).
|
149
149
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Mocha::ParameterMatchers::Anything
|
8
8
|
|
9
|
-
— Mocha 1.
|
9
|
+
— Mocha 1.11.2
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -143,7 +143,7 @@
|
|
143
143
|
</div>
|
144
144
|
|
145
145
|
<div id="footer">
|
146
|
-
Generated on
|
146
|
+
Generated on Sat Jan 4 17:36:48 2020 by
|
147
147
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
148
148
|
0.9.20 (ruby-2.6.5).
|
149
149
|
</div>
|