diff --git a/docs/Mocha.html b/docs/Mocha.html index 3689f0ab..df118ef2 100644 --- a/docs/Mocha.html +++ b/docs/Mocha.html @@ -6,7 +6,7 @@ <title> Module: Mocha - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -216,12 +216,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -19 20 -21</pre> +21 +22</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 19</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 20</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span> <span class='kw'>yield</span> <span class='id identifier rubyid_configuration'>configuration</span> @@ -236,7 +236,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/API.html b/docs/Mocha/API.html index bfef9e71..709a896f 100644 --- a/docs/Mocha/API.html +++ b/docs/Mocha/API.html @@ -6,7 +6,7 @@ <title> Module: Mocha::API - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -1247,7 +1247,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ClassMethods.html b/docs/Mocha/ClassMethods.html index 02eeba88..6c8565d5 100644 --- a/docs/Mocha/ClassMethods.html +++ b/docs/Mocha/ClassMethods.html @@ -6,7 +6,7 @@ <title> Module: Mocha::ClassMethods - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -246,7 +246,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Configuration.html b/docs/Mocha/Configuration.html index 686f37e8..5c77e050 100644 --- a/docs/Mocha/Configuration.html +++ b/docs/Mocha/Configuration.html @@ -6,7 +6,7 @@ <title> Class: Mocha::Configuration - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -224,7 +224,7 @@ <h2> </li> - <li class="public "> + <li class="public deprecated"> <span class="summary_signature"> <a href="#stubbing_method_on_nil=-instance_method" title="#stubbing_method_on_nil= (instance method)">#<strong>stubbing_method_on_nil=</strong>(value) ⇒ Object </a> @@ -237,12 +237,12 @@ <h2> - + <span class="deprecated note title">deprecated</span> - <span class="summary_desc"><div class='inline'> -<p>Configure whether stubbing methods on the <code>nil</code> object is allowed.</p> + <span class="summary_desc"><strong>Deprecated.</strong> <div class='inline'> +<p>This method is deprecated and will be removed in a future release. <code>nil</code> is frozen in Ruby >= v2.2 and Mocha will be dropping support for Ruby v2.1. At that point it won’t be possible to stub methods on <code>nil</code> any more.</p> </div></span> </li> @@ -433,16 +433,16 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -318 -319 -320 -321 -322 -323 -324</pre> +325 +326 +327 +328 +329 +330 +331</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 318</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 325</span> <span class='kw'>def</span> <span class='id identifier rubyid_override'>override</span><span class='lparen'>(</span><span class='id identifier rubyid_temporary_options'>temporary_options</span><span class='rparen'>)</span> <span class='id identifier rubyid_original_configuration'>original_configuration</span> <span class='op'>=</span> <span class='id identifier rubyid_configuration'>configuration</span> @@ -539,12 +539,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -244 -245 -246</pre> +251 +252 +253</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 244</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 251</span> <span class='kw'>def</span> <span class='id identifier rubyid_display_matching_invocations_on_failure='>display_matching_invocations_on_failure=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:display_matching_invocations_on_failure</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> @@ -647,13 +647,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -290 -291 -292 -293</pre> +297 +298 +299 +300</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 290</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 297</span> <span class='kw'>def</span> <span class='id identifier rubyid_strict_keyword_argument_matching='>strict_keyword_argument_matching=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Strict keyword argument matching requires Ruby 2.7 and above.</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</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'>RUBY_V27_PLUS</span> @@ -675,7 +675,10 @@ <h3 class="signature " id="stubbing_method_on_nil=-instance_method"> </h3><div class="docstring"> <div class="discussion"> - + <div class="note deprecated"><strong>Deprecated.</strong> <div class='inline'> +<p>This method is deprecated and will be removed in a future release. <code>nil</code> is frozen in Ruby >= v2.2 and Mocha will be dropping support for Ruby v2.1. At that point it won’t be possible to stub methods on <code>nil</code> any more.</p> +</div></div> + <p>Configure whether stubbing methods on the <code>nil</code> object is allowed.</p> <p>This is usually done accidentally, but there might be rare cases where it is intended.</p> @@ -716,14 +719,24 @@ <h3 class="signature " id="stubbing_method_on_nil=-instance_method"> <pre class="lines"> -210 -211 -212</pre> +212 +213 +214 +215 +216 +217 +218 +219</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 210</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 212</span> <span class='kw'>def</span> <span class='id identifier rubyid_stubbing_method_on_nil='>stubbing_method_on_nil=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> + <span class='const'>Deprecation</span><span class='period'>.</span><span class='id identifier rubyid_warning'>warning</span><span class='lparen'>(</span><span class='lbracket'>[</span> + <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>`Mocha::Configuration#stubbing_method_on_nil=` is deprecated and will be removed in a future release.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> + <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>`nil` is frozen in Ruby >= v2.2 and Mocha will be dropping support for Ruby v2.1.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> + <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>At that point it won't be possible to stub methods on `nil` any more.</span><span class='tstring_end'>"</span></span> + <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:stubbing_method_on_nil</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> <span class='kw'>end</span></pre> </td> @@ -804,12 +817,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -122 123 -124</pre> +124 +125</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 122</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 123</span> <span class='kw'>def</span> <span class='id identifier rubyid_stubbing_method_on_non_mock_object='>stubbing_method_on_non_mock_object=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:stubbing_method_on_non_mock_object</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> @@ -888,12 +901,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -89 90 -91</pre> +91 +92</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 89</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 90</span> <span class='kw'>def</span> <span class='id identifier rubyid_stubbing_method_unnecessarily='>stubbing_method_unnecessarily=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:stubbing_method_unnecessarily</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> @@ -976,12 +989,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -155 156 -157</pre> +157 +158</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 155</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 156</span> <span class='kw'>def</span> <span class='id identifier rubyid_stubbing_non_existent_method='>stubbing_non_existent_method=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:stubbing_non_existent_method</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> @@ -1065,12 +1078,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -189 190 -191</pre> +191 +192</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 189</span> + <pre class="code"><span class="info file"># File 'lib/mocha/configuration.rb', line 190</span> <span class='kw'>def</span> <span class='id identifier rubyid_stubbing_non_public_method='>stubbing_non_public_method=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:stubbing_non_public_method</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span> @@ -1085,7 +1098,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Expectation.html b/docs/Mocha/Expectation.html index 0b05fd41..62c49138 100644 --- a/docs/Mocha/Expectation.html +++ b/docs/Mocha/Expectation.html @@ -6,7 +6,7 @@ <title> Class: Mocha::Expectation - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -1059,13 +1059,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -588 -589 -590 -591</pre> +609 +610 +611 +612</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 588</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 609</span> <span class='kw'>def</span> <span class='id identifier rubyid_in_sequence'>in_sequence</span><span class='lparen'>(</span><span class='id identifier rubyid_sequence'>sequence</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_sequences'>sequences</span><span class='rparen'>)</span> <span class='id identifier rubyid_sequences'>sequences</span><span class='period'>.</span><span class='id identifier rubyid_unshift'>unshift</span><span class='lparen'>(</span><span class='id identifier rubyid_sequence'>sequence</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_seq'>seq</span><span class='op'>|</span> <span class='id identifier rubyid_add_in_sequence_ordering_constraint'>add_in_sequence_ordering_constraint</span><span class='lparen'>(</span><span class='id identifier rubyid_seq'>seq</span><span class='rparen'>)</span> <span class='rbrace'>}</span> @@ -1179,13 +1179,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -375 -376 -377 -378</pre> +396 +397 +398 +399</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 375</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 396</span> <span class='kw'>def</span> <span class='id identifier rubyid_multiple_yields'>multiple_yields</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_parameter_groups'>parameter_groups</span><span class='rparen'>)</span> <span class='ivar'>@yield_parameters</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_parameter_groups'>parameter_groups</span><span class='rparen'>)</span> @@ -1505,13 +1505,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -462 -463 -464 -465</pre> +483 +484 +485 +486</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 462</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 483</span> <span class='kw'>def</span> <span class='id identifier rubyid_raises'>raises</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span> <span class='op'>=</span> <span class='const'>RuntimeError</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='ivar'>@return_values</span> <span class='op'>+=</span> <span class='const'>ReturnValues</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>ExceptionRaiser</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_exception'>exception</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span><span class='rparen'>)</span> @@ -1710,13 +1710,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -422 -423 -424 -425</pre> +443 +444 +445 +446</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 422</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 443</span> <span class='kw'>def</span> <span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> <span class='ivar'>@return_values</span> <span class='op'>+=</span> <span class='const'>ReturnValues</span><span class='period'>.</span><span class='id identifier rubyid_build'>build</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> @@ -1877,13 +1877,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -536 -537 -538 -539</pre> +557 +558 +559 +560</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 536</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 557</span> <span class='kw'>def</span> <span class='kw'>then</span><span class='lparen'>(</span><span class='id identifier rubyid_state'>state</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='id identifier rubyid_add_side_effect'>add_side_effect</span><span class='lparen'>(</span><span class='const'>ChangeStateSideEffect</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_state'>state</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_state'>state</span> @@ -2033,13 +2033,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -501 -502 -503 -504</pre> +522 +523 +524 +525</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 501</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 522</span> <span class='kw'>def</span> <span class='id identifier rubyid_throws'>throws</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_object'>object</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='ivar'>@return_values</span> <span class='op'>+=</span> <span class='const'>ReturnValues</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Thrower</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_object'>object</span><span class='rparen'>)</span><span class='rparen'>)</span> @@ -2349,13 +2349,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -560 -561 -562 -563</pre> +581 +582 +583 +584</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 560</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 581</span> <span class='kw'>def</span> <span class='kw'>when</span><span class='lparen'>(</span><span class='id identifier rubyid_state_predicate'>state_predicate</span><span class='rparen'>)</span> <span class='id identifier rubyid_add_ordering_constraint'>add_ordering_constraint</span><span class='lparen'>(</span><span class='const'>InStateOrderingConstraint</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_state_predicate'>state_predicate</span><span class='rparen'>)</span><span class='rparen'>)</span> @@ -2382,6 +2382,10 @@ <h3 class="signature " id="with-instance_method"> <p>May be used with Ruby literals or variables for exact matching or with parameter matchers for less-specific matching, e.g. <span class='object_link'><a href="ParameterMatchers.html#includes-instance_method" title="Mocha::ParameterMatchers#includes (method)">ParameterMatchers#includes</a></span>, <span class='object_link'><a href="ParameterMatchers.html#has_key-instance_method" title="Mocha::ParameterMatchers#has_key (method)">ParameterMatchers#has_key</a></span>, etc. See <span class='object_link'><a href="ParameterMatchers.html" title="Mocha::ParameterMatchers (module)">ParameterMatchers</a></span> for a list of all available parameter matchers.</p> +<p>Alternatively a block argument can be passed to <span class='object_link'><a href="#with-instance_method" title="Mocha::Expectation#with (method)">#with</a></span> to implement custom parameter matching. The block receives the <tt>*actual_parameters</tt> as its arguments and should return <code>true</code> if they are acceptable or <code>false</code> otherwise. See the example below where a method is expected to be called with a value divisible by 4. The block argument takes precedence over <code>expected_parameters_or_matchers</code>. The block may be called multiple times per invocation of the expected method and so it should be idempotent.</p> + +<p>Note that if <span class='object_link'><a href="#with-instance_method" title="Mocha::Expectation#with (method)">#with</a></span> is called multiple times on the same expectation, the last call takes precedence; other calls are ignored.</p> + <p>Positional arguments were separated from keyword arguments in Ruby v3 (see <a href="https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0" target="_parent" title="this article">this article</a>). In relation to this a new configuration option (<span class='object_link'><a href="Configuration.html#strict_keyword_argument_matching=-instance_method" title="Mocha::Configuration#strict_keyword_argument_matching= (method)">Configuration#strict_keyword_argument_matching=</a></span>) is available in Ruby >= 2.7.</p> <p>When <span class='object_link'><a href="Configuration.html#strict_keyword_argument_matching=-instance_method" title="Mocha::Configuration#strict_keyword_argument_matching= (method)">Configuration#strict_keyword_argument_matching=</a></span> is set to <code>false</code> (which is currently the default), a positional <code>Hash</code> and a set of keyword arguments passed to <span class='object_link'><a href="#with-instance_method" title="Mocha::Expectation#with (method)">#with</a></span> are treated the same for the purposes of parameter matching. However, a deprecation warning will be displayed if a positional <code>Hash</code> matches a set of keyword arguments or vice versa. This is because <span class='object_link'><a href="Configuration.html#strict_keyword_argument_matching=-instance_method" title="Mocha::Configuration#strict_keyword_argument_matching= (method)">Configuration#strict_keyword_argument_matching=</a></span> will default to <code>true</code> in the future.</p> @@ -2462,7 +2466,7 @@ <h5 class="example_title"><div class='inline'> <h5 class="example_title"><div class='inline'> -<p>Expected method must be called with a value divisible by 4.</p> +<p>Using a block argument to expect the method to be called with a value divisible by 4.</p> </div></h5> <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> @@ -2475,6 +2479,26 @@ <h5 class="example_title"><div class='inline'> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_expected_method'>expected_method</span><span class='lparen'>(</span><span class='int'>17</span><span class='rparen'>)</span> <span class='comment'># => verify fails</span></code></pre> + + <h5 class="example_title"><div class='inline'> +<p>Extracting a custom matcher into an instance method on the test class.</p> +</div></h5> + + <pre class="example code"><code><span class='kw'>class</span> <span class='const'>MyTest</span> <span class='op'><</span> <span class='const'>Minitest</span><span class='op'>::</span><span class='const'>Test</span> + <span class='kw'>def</span> <span class='id identifier rubyid_test_expected_method_is_called_with_a_value_divisible_by_4'>test_expected_method_is_called_with_a_value_divisible_by_4</span> + <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> + <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='symbol'>:expected_method</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:divisible_by_4</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_expected_method'>expected_method</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span> + <span class='comment'># => verify succeeds +</span> <span class='kw'>end</span> + + <span class='id identifier rubyid_private'>private</span> + + <span class='kw'>def</span> <span class='id identifier rubyid_divisible_by_4'>divisible_by_4</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> + <span class='id identifier rubyid_value'>value</span> <span class='op'>%</span> <span class='int'>4</span> <span class='op'>==</span> <span class='int'>0</span> + <span class='kw'>end</span> +<span class='kw'>end</span></code></pre> + </div> <p class="tag_title">Parameters:</p> <ul class="param"> @@ -2484,7 +2508,7 @@ <h5 class="example_title"><div class='inline'> <span class='name'>expected_parameters_or_matchers</span> - <span class='type'>(<tt>*Array<<span class='object_link'>Object</span>,<span class='object_link'><a href="ParameterMatchers/Base.html" title="Mocha::ParameterMatchers::Base (class)">ParameterMatchers::Base</a></span>></tt>)</span> + <span class='type'>(<tt>Array<<span class='object_link'>Object</span>,<span class='object_link'><a href="ParameterMatchers/Base.html" title="Mocha::ParameterMatchers::Base (class)">ParameterMatchers::Base</a></span>></tt>)</span> @@ -2523,7 +2547,7 @@ <h5 class="example_title"><div class='inline'> <span class='name'>actual_parameters</span> - <span class='type'>(<tt>*Array<<span class='object_link'>Object</span>></tt>)</span> + <span class='type'>(<tt>Array<<span class='object_link'>Object</span>></tt>)</span> @@ -2547,7 +2571,7 @@ <h5 class="example_title"><div class='inline'> — <div class='inline'> -<p><code>true</code> if <code>actual_parameters</code> are acceptable.</p> +<p><code>true</code> if <code>actual_parameters</code> are acceptable; <code>false</code> otherwise.</p> </div> </li> @@ -2587,13 +2611,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -269 -270 -271 -272</pre> +290 +291 +292 +293</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 269</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 290</span> <span class='kw'>def</span> <span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_expected_parameters_or_matchers'>expected_parameters_or_matchers</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_matching_block'>matching_block</span><span class='rparen'>)</span> <span class='ivar'>@parameters_matcher</span> <span class='op'>=</span> <span class='const'>ParametersMatcher</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_expected_parameters_or_matchers'>expected_parameters_or_matchers</span><span class='comma'>,</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_matching_block'>matching_block</span><span class='rparen'>)</span> @@ -2668,13 +2692,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -289 -290 -291 -292</pre> +310 +311 +312 +313</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 289</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 310</span> <span class='kw'>def</span> <span class='id identifier rubyid_with_block_given'>with_block_given</span> <span class='ivar'>@block_matcher</span> <span class='op'>=</span> <span class='const'>BlockMatchers</span><span class='op'>::</span><span class='const'>BlockGiven</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> @@ -2749,13 +2773,13 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -308 -309 -310 -311</pre> +329 +330 +331 +332</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 308</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 329</span> <span class='kw'>def</span> <span class='id identifier rubyid_with_no_block_given'>with_no_block_given</span> <span class='ivar'>@block_matcher</span> <span class='op'>=</span> <span class='const'>BlockMatchers</span><span class='op'>::</span><span class='const'>NoBlockGiven</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> @@ -2883,12 +2907,12 @@ <h5 class="example_title"><div class='inline'> <pre class="lines"> -347 -348 -349</pre> +368 +369 +370</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 347</span> + <pre class="code"><span class="info file"># File 'lib/mocha/expectation.rb', line 368</span> <span class='kw'>def</span> <span class='id identifier rubyid_yields'>yields</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_parameters'>parameters</span><span class='rparen'>)</span> <span class='id identifier rubyid_multiple_yields'>multiple_yields</span><span class='lparen'>(</span><span class='id identifier rubyid_parameters'>parameters</span><span class='rparen'>)</span> @@ -2903,7 +2927,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ExpectationError.html b/docs/Mocha/ExpectationError.html index 1727a8fc..76a1ae03 100644 --- a/docs/Mocha/ExpectationError.html +++ b/docs/Mocha/ExpectationError.html @@ -6,7 +6,7 @@ <title> Exception: Mocha::ExpectationError - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -134,7 +134,7 @@ <h2>Overview</h2><div class="docstring"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ExpectationErrorFactory.html b/docs/Mocha/ExpectationErrorFactory.html index c290f22a..a499e2f6 100644 --- a/docs/Mocha/ExpectationErrorFactory.html +++ b/docs/Mocha/ExpectationErrorFactory.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ExpectationErrorFactory - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -242,7 +242,7 @@ <h3 class="signature first" id="exception_class-class_method"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Hooks.html b/docs/Mocha/Hooks.html index 1e121dd2..61fc654b 100644 --- a/docs/Mocha/Hooks.html +++ b/docs/Mocha/Hooks.html @@ -6,7 +6,7 @@ <title> Module: Mocha::Hooks - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -417,7 +417,7 @@ <h3 class="signature " id="mocha_verify-instance_method"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Integration.html b/docs/Mocha/Integration.html index da7b7528..00b22fa4 100644 --- a/docs/Mocha/Integration.html +++ b/docs/Mocha/Integration.html @@ -6,7 +6,7 @@ <title> Module: Mocha::Integration - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -107,7 +107,7 @@ <h2>Defined Under Namespace</h2> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Integration/MiniTest.html b/docs/Mocha/Integration/MiniTest.html index 27f393f4..2b2102ee 100644 --- a/docs/Mocha/Integration/MiniTest.html +++ b/docs/Mocha/Integration/MiniTest.html @@ -6,7 +6,7 @@ <title> Module: Mocha::Integration::Minitest - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -105,7 +105,7 @@ <h2>Defined Under Namespace</h2> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Integration/MiniTest/Adapter.html b/docs/Mocha/Integration/MiniTest/Adapter.html index 65a944a6..2f599f76 100644 --- a/docs/Mocha/Integration/MiniTest/Adapter.html +++ b/docs/Mocha/Integration/MiniTest/Adapter.html @@ -6,7 +6,7 @@ <title> Module: Mocha::Integration::Minitest::Adapter - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -146,7 +146,7 @@ <h3 class="inherited">Methods included from <span class='object_link'><a href=". </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Integration/TestUnit.html b/docs/Mocha/Integration/TestUnit.html index b748a98e..d27dcf30 100644 --- a/docs/Mocha/Integration/TestUnit.html +++ b/docs/Mocha/Integration/TestUnit.html @@ -6,7 +6,7 @@ <title> Module: Mocha::Integration::TestUnit - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -105,7 +105,7 @@ <h2>Defined Under Namespace</h2> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Integration/TestUnit/Adapter.html b/docs/Mocha/Integration/TestUnit/Adapter.html index e221457c..8ca21a9b 100644 --- a/docs/Mocha/Integration/TestUnit/Adapter.html +++ b/docs/Mocha/Integration/TestUnit/Adapter.html @@ -6,7 +6,7 @@ <title> Module: Mocha::Integration::TestUnit::Adapter - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -146,7 +146,7 @@ <h3 class="inherited">Methods included from <span class='object_link'><a href=". </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Mock.html b/docs/Mocha/Mock.html index f8953973..fa418665 100644 --- a/docs/Mocha/Mock.html +++ b/docs/Mocha/Mock.html @@ -6,7 +6,7 @@ <title> Class: Mocha::Mock - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -1118,7 +1118,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ObjectMethods.html b/docs/Mocha/ObjectMethods.html index 7dc5851c..d0d34960 100644 --- a/docs/Mocha/ObjectMethods.html +++ b/docs/Mocha/ObjectMethods.html @@ -6,7 +6,7 @@ <title> Module: Mocha::ObjectMethods - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -747,7 +747,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers.html b/docs/Mocha/ParameterMatchers.html index d6260ac5..cd0ec195 100644 --- a/docs/Mocha/ParameterMatchers.html +++ b/docs/Mocha/ParameterMatchers.html @@ -6,7 +6,7 @@ <title> Module: Mocha::ParameterMatchers - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -3167,7 +3167,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/AllOf.html b/docs/Mocha/ParameterMatchers/AllOf.html index 1530a6c5..318c8005 100644 --- a/docs/Mocha/ParameterMatchers/AllOf.html +++ b/docs/Mocha/ParameterMatchers/AllOf.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::AllOf - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/AnyOf.html b/docs/Mocha/ParameterMatchers/AnyOf.html index 7c3eb289..6cb4879d 100644 --- a/docs/Mocha/ParameterMatchers/AnyOf.html +++ b/docs/Mocha/ParameterMatchers/AnyOf.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::AnyOf - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/AnyParameters.html b/docs/Mocha/ParameterMatchers/AnyParameters.html index 6ab3df40..30ef9fb4 100644 --- a/docs/Mocha/ParameterMatchers/AnyParameters.html +++ b/docs/Mocha/ParameterMatchers/AnyParameters.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::AnyParameters - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/Anything.html b/docs/Mocha/ParameterMatchers/Anything.html index 17ca5bc2..25f4cd3d 100644 --- a/docs/Mocha/ParameterMatchers/Anything.html +++ b/docs/Mocha/ParameterMatchers/Anything.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::Anything - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/Base.html b/docs/Mocha/ParameterMatchers/Base.html index 14deba14..6dffcd78 100644 --- a/docs/Mocha/ParameterMatchers/Base.html +++ b/docs/Mocha/ParameterMatchers/Base.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::Base - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -423,7 +423,7 @@ <h5 class="example_title"><div class='inline'> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/Equals.html b/docs/Mocha/ParameterMatchers/Equals.html index e2c00fca..55447f81 100644 --- a/docs/Mocha/ParameterMatchers/Equals.html +++ b/docs/Mocha/ParameterMatchers/Equals.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::Equals - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/EquivalentUri.html b/docs/Mocha/ParameterMatchers/EquivalentUri.html index 2fc1864e..87f6e14d 100644 --- a/docs/Mocha/ParameterMatchers/EquivalentUri.html +++ b/docs/Mocha/ParameterMatchers/EquivalentUri.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::EquivalentUri - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/HasEntries.html b/docs/Mocha/ParameterMatchers/HasEntries.html index a5cf2954..2529f997 100644 --- a/docs/Mocha/ParameterMatchers/HasEntries.html +++ b/docs/Mocha/ParameterMatchers/HasEntries.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::HasEntries - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/HasEntry.html b/docs/Mocha/ParameterMatchers/HasEntry.html index fde68400..d6a08cba 100644 --- a/docs/Mocha/ParameterMatchers/HasEntry.html +++ b/docs/Mocha/ParameterMatchers/HasEntry.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::HasEntry - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/HasKey.html b/docs/Mocha/ParameterMatchers/HasKey.html index c75841c6..7039c736 100644 --- a/docs/Mocha/ParameterMatchers/HasKey.html +++ b/docs/Mocha/ParameterMatchers/HasKey.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::HasKey - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/HasKeys.html b/docs/Mocha/ParameterMatchers/HasKeys.html index d0c7c58a..4985d356 100644 --- a/docs/Mocha/ParameterMatchers/HasKeys.html +++ b/docs/Mocha/ParameterMatchers/HasKeys.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::HasKeys - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/HasValue.html b/docs/Mocha/ParameterMatchers/HasValue.html index 33c67fcc..b1868e7e 100644 --- a/docs/Mocha/ParameterMatchers/HasValue.html +++ b/docs/Mocha/ParameterMatchers/HasValue.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::HasValue - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/Includes.html b/docs/Mocha/ParameterMatchers/Includes.html index 7250291b..6fe18993 100644 --- a/docs/Mocha/ParameterMatchers/Includes.html +++ b/docs/Mocha/ParameterMatchers/Includes.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::Includes - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/InstanceOf.html b/docs/Mocha/ParameterMatchers/InstanceOf.html index 19d8def5..0b5519e7 100644 --- a/docs/Mocha/ParameterMatchers/InstanceOf.html +++ b/docs/Mocha/ParameterMatchers/InstanceOf.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::InstanceOf - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/IsA.html b/docs/Mocha/ParameterMatchers/IsA.html index d16af2b6..4f88f42d 100644 --- a/docs/Mocha/ParameterMatchers/IsA.html +++ b/docs/Mocha/ParameterMatchers/IsA.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::IsA - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/KindOf.html b/docs/Mocha/ParameterMatchers/KindOf.html index c67c8a87..e5162fdf 100644 --- a/docs/Mocha/ParameterMatchers/KindOf.html +++ b/docs/Mocha/ParameterMatchers/KindOf.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::KindOf - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/Not.html b/docs/Mocha/ParameterMatchers/Not.html index 26d210e9..8c2f6dc8 100644 --- a/docs/Mocha/ParameterMatchers/Not.html +++ b/docs/Mocha/ParameterMatchers/Not.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::Not - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/Optionally.html b/docs/Mocha/ParameterMatchers/Optionally.html index f96d7e51..4a424b9e 100644 --- a/docs/Mocha/ParameterMatchers/Optionally.html +++ b/docs/Mocha/ParameterMatchers/Optionally.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::Optionally - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/RegexpMatches.html b/docs/Mocha/ParameterMatchers/RegexpMatches.html index 174c8949..462ca24c 100644 --- a/docs/Mocha/ParameterMatchers/RegexpMatches.html +++ b/docs/Mocha/ParameterMatchers/RegexpMatches.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::RegexpMatches - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/RespondsWith.html b/docs/Mocha/ParameterMatchers/RespondsWith.html index bcb1b441..2bd4ef60 100644 --- a/docs/Mocha/ParameterMatchers/RespondsWith.html +++ b/docs/Mocha/ParameterMatchers/RespondsWith.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::RespondsWith - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/ParameterMatchers/YamlEquivalent.html b/docs/Mocha/ParameterMatchers/YamlEquivalent.html index a149ff86..ac2a8bd8 100644 --- a/docs/Mocha/ParameterMatchers/YamlEquivalent.html +++ b/docs/Mocha/ParameterMatchers/YamlEquivalent.html @@ -6,7 +6,7 @@ <title> Class: Mocha::ParameterMatchers::YamlEquivalent - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -135,7 +135,7 @@ <h3 class="inherited">Methods inherited from <span class='object_link'><a href=" </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/Sequence.html b/docs/Mocha/Sequence.html index f3ac4709..4f1f23cb 100644 --- a/docs/Mocha/Sequence.html +++ b/docs/Mocha/Sequence.html @@ -6,7 +6,7 @@ <title> Class: Mocha::Sequence - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -131,7 +131,7 @@ <h2>Overview</h2><div class="docstring"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/StateMachine.html b/docs/Mocha/StateMachine.html index f4fcacbc..e8d47d54 100644 --- a/docs/Mocha/StateMachine.html +++ b/docs/Mocha/StateMachine.html @@ -6,7 +6,7 @@ <title> Class: Mocha::StateMachine - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -664,7 +664,7 @@ <h3 class="signature " id="starts_as-instance_method"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/StateMachine/State.html b/docs/Mocha/StateMachine/State.html index 1024330a..4325f2dc 100644 --- a/docs/Mocha/StateMachine/State.html +++ b/docs/Mocha/StateMachine/State.html @@ -6,7 +6,7 @@ <title> Class: Mocha::StateMachine::State - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -130,7 +130,7 @@ <h2>Overview</h2><div class="docstring"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/StateMachine/StatePredicate.html b/docs/Mocha/StateMachine/StatePredicate.html index e8ba4a00..312f79bf 100644 --- a/docs/Mocha/StateMachine/StatePredicate.html +++ b/docs/Mocha/StateMachine/StatePredicate.html @@ -6,7 +6,7 @@ <title> Class: Mocha::StateMachine::StatePredicate - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -126,7 +126,7 @@ <h2>Direct Known Subclasses</h2> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/Mocha/StubbingError.html b/docs/Mocha/StubbingError.html index 984c3f0e..a5c09e00 100644 --- a/docs/Mocha/StubbingError.html +++ b/docs/Mocha/StubbingError.html @@ -6,7 +6,7 @@ <title> Class: Mocha::StubbingError - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -132,7 +132,7 @@ <h2>Overview</h2><div class="docstring"> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:10 2024 by + Generated on Mon Dec 9 12:52:25 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/_index.html b/docs/_index.html index 1c01e3ad..c348dd14 100644 --- a/docs/_index.html +++ b/docs/_index.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> - Mocha 2.7.0 + Mocha 2.7.1 </title> @@ -52,7 +52,7 @@ <div class="clear"></div> </div> - <div id="content"><h1 class="noborder title">Mocha 2.7.0</h1> + <div id="content"><h1 class="noborder title">Mocha 2.7.1</h1> <div id="listing"> <h1 class="alphaindex">Alphabetic Index</h1> @@ -508,7 +508,7 @@ <h2>Namespace Listing A-Z</h2> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/file.COPYING.html b/docs/file.COPYING.html index f7b714dc..8c99c316 100644 --- a/docs/file.COPYING.html +++ b/docs/file.COPYING.html @@ -6,7 +6,7 @@ <title> File: COPYING - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -63,7 +63,7 @@ </div></div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/file.MIT-LICENSE.html b/docs/file.MIT-LICENSE.html index e46af3ee..cd1fa8df 100644 --- a/docs/file.MIT-LICENSE.html +++ b/docs/file.MIT-LICENSE.html @@ -6,7 +6,7 @@ <title> File: MIT-LICENSE - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -67,7 +67,7 @@ </div></div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/file.README.html b/docs/file.README.html index 2f06e089..96d6ac6d 100644 --- a/docs/file.README.html +++ b/docs/file.README.html @@ -6,7 +6,7 @@ <title> File: README - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -430,7 +430,7 @@ <h3 id="license">License</h3> </div></div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/file.RELEASE.html b/docs/file.RELEASE.html index e20201fe..c4670de8 100644 --- a/docs/file.RELEASE.html +++ b/docs/file.RELEASE.html @@ -6,7 +6,7 @@ <title> File: RELEASE - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -59,6 +59,16 @@ <div id="content"><div id='filecontents'><h1 id="release-notes">Release Notes</h1> +<h2 id="2-7-1">2.7.1</h2> + +<h3 id="external-changes">External changes</h3> + +<ul> +<li>Deprecate <code>Configuration#stubbing_method_on_nil=</code> (#694)</li> +<li>Indicate when parameter matcher logic is defined by block passed to <code>Expectation#with</code> (#698, b30e4434)</li> +<li>Improve documentation for <code>Expectation#with</code>, especially when it is passed a block (#698, #682, #606 & #681)</li> +</ul> + <h2 id="2-7-0">2.7.0</h2> <h3 id="external-changes">External changes</h3> @@ -1529,7 +1539,7 @@ <h2 id="0-1-1">0.1.1</h2> </div></div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/frames.html b/docs/frames.html index 2851f79f..5fb630ff 100644 --- a/docs/frames.html +++ b/docs/frames.html @@ -2,7 +2,7 @@ <html> <head> <meta charset="utf-8"> - <title>Mocha 2.7.0</title> + <title>Mocha 2.7.1</title> </head> <script type="text/javascript"> var mainUrl = 'index.html'; diff --git a/docs/index.html b/docs/index.html index d100f8ea..d9320363 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ <title> File: README - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -430,7 +430,7 @@ <h3 id="license">License</h3> </div></div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div> diff --git a/docs/method_list.html b/docs/method_list.html index 11b39ef0..4dbb0210 100644 --- a/docs/method_list.html +++ b/docs/method_list.html @@ -471,7 +471,7 @@ <h1 id="full_list_header">Method List</h1> </li> - <li class="even "> + <li class="even deprecated"> <div class="item"> <span class='object_link'><a href="Mocha/Configuration.html#stubbing_method_on_nil=-instance_method" title="Mocha::Configuration#stubbing_method_on_nil= (method)">#stubbing_method_on_nil=</a></span> <small>Mocha::Configuration</small> diff --git a/docs/top-level-namespace.html b/docs/top-level-namespace.html index d41ff497..d36df15e 100644 --- a/docs/top-level-namespace.html +++ b/docs/top-level-namespace.html @@ -6,7 +6,7 @@ <title> Top Level Namespace - — Mocha 2.7.0 + — Mocha 2.7.1 </title> @@ -100,7 +100,7 @@ <h2>Defined Under Namespace</h2> </div> <div id="footer"> - Generated on Sat Dec 7 12:49:09 2024 by + Generated on Mon Dec 9 12:52:24 2024 by <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.37 (ruby-3.3.6). </div>