Skip to content

Commit b4310b8

Browse files
committed
[skip ci] Update documentation for v3.0.0-rc.2
1 parent 31e433a commit b4310b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3633
-3394
lines changed

docs/Mocha.html

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>
77
Module: Mocha
88

9-
&mdash; Mocha 3.0.0-rc.1
9+
&mdash; Mocha 3.0.0-rc.2
1010

1111
</title>
1212

@@ -78,14 +78,39 @@
7878

7979
<dl>
8080
<dt>Defined in:</dt>
81-
<dd>lib/mocha/api.rb<span class="defines">,<br />
82-
lib/mocha/hooks.rb,<br /> lib/mocha/mock.rb,<br /> lib/mocha/expectation.rb,<br /> lib/mocha/object_methods.rb,<br /> lib/mocha/class_methods.rb,<br /> lib/mocha/parameter_matchers.rb,<br /> lib/mocha/parameter_matchers/not.rb,<br /> lib/mocha/parameter_matchers/base.rb,<br /> lib/mocha/parameter_matchers/is_a.rb,<br /> lib/mocha/parameter_matchers/all_of.rb,<br /> lib/mocha/parameter_matchers/any_of.rb,<br /> lib/mocha/parameter_matchers/equals.rb,<br /> lib/mocha/parameter_matchers/has_key.rb,<br /> lib/mocha/parameter_matchers/kind_of.rb,<br /> lib/mocha/parameter_matchers/anything.rb,<br /> lib/mocha/parameter_matchers/has_keys.rb,<br /> lib/mocha/parameter_matchers/includes.rb,<br /> lib/mocha/parameter_matchers/has_entry.rb,<br /> lib/mocha/parameter_matchers/has_value.rb,<br /> lib/mocha/parameter_matchers/optionally.rb,<br /> lib/mocha/parameter_matchers/has_entries.rb,<br /> lib/mocha/parameter_matchers/instance_of.rb,<br /> lib/mocha/parameter_matchers/responds_with.rb,<br /> lib/mocha/parameter_matchers/any_parameters.rb,<br /> lib/mocha/parameter_matchers/equivalent_uri.rb,<br /> lib/mocha/parameter_matchers/regexp_matches.rb,<br /> lib/mocha/parameter_matchers/yaml_equivalent.rb,<br /> lib/mocha/parameter_matchers/instance_methods.rb,<br /> lib/mocha/parameter_matchers/positional_or_keyword_hash.rb,<br /> lib/mocha/state_machine.rb,<br /> lib/mocha/sequence.rb,<br /> lib/mocha/configuration.rb,<br /> lib/mocha/expectation_error_factory.rb,<br /> lib/mocha/expectation_error.rb,<br /> lib/mocha/stubbing_error.rb,<br /> lib/mocha/integration/test_unit/adapter.rb,<br /> lib/mocha/integration/minitest/adapter.rb</span>
81+
<dd>lib/mocha.rb<span class="defines">,<br />
82+
lib/mocha/api.rb,<br /> lib/mocha/hooks.rb,<br /> lib/mocha/mock.rb,<br /> lib/mocha/expectation.rb,<br /> lib/mocha/object_methods.rb,<br /> lib/mocha/class_methods.rb,<br /> lib/mocha/parameter_matchers.rb,<br /> lib/mocha/parameter_matchers/not.rb,<br /> lib/mocha/parameter_matchers/is_a.rb,<br /> lib/mocha/parameter_matchers/all_of.rb,<br /> lib/mocha/parameter_matchers/any_of.rb,<br /> lib/mocha/parameter_matchers/equals.rb,<br /> lib/mocha/parameter_matchers/has_key.rb,<br /> lib/mocha/parameter_matchers/kind_of.rb,<br /> lib/mocha/parameter_matchers/anything.rb,<br /> lib/mocha/parameter_matchers/has_keys.rb,<br /> lib/mocha/parameter_matchers/includes.rb,<br /> lib/mocha/parameter_matchers/has_entry.rb,<br /> lib/mocha/parameter_matchers/has_value.rb,<br /> lib/mocha/parameter_matchers/optionally.rb,<br /> lib/mocha/parameter_matchers/has_entries.rb,<br /> lib/mocha/parameter_matchers/instance_of.rb,<br /> lib/mocha/parameter_matchers/base_methods.rb,<br /> lib/mocha/parameter_matchers/responds_with.rb,<br /> lib/mocha/parameter_matchers/any_parameters.rb,<br /> lib/mocha/parameter_matchers/equivalent_uri.rb,<br /> lib/mocha/parameter_matchers/regexp_matches.rb,<br /> lib/mocha/parameter_matchers/yaml_equivalent.rb,<br /> lib/mocha/parameter_matchers/instance_methods.rb,<br /> lib/mocha/parameter_matchers/positional_or_keyword_hash.rb,<br /> lib/mocha/state_machine.rb,<br /> lib/mocha/sequence.rb,<br /> lib/mocha/configuration.rb,<br /> lib/mocha/expectation_error_factory.rb,<br /> lib/mocha/expectation_error.rb,<br /> lib/mocha/stubbing_error.rb,<br /> lib/mocha/integration.rb,<br /> lib/mocha/integration/test_unit/adapter.rb,<br /> lib/mocha/integration/minitest/adapter.rb</span>
8383
</dd>
8484
</dl>
8585

8686
</div>
8787

88-
<h2>Defined Under Namespace</h2>
88+
<h2>Overview</h2><div class="docstring">
89+
<div class="discussion">
90+
91+
<p>Mocha’s top level namespace, which also provides the ability to <span class='object_link'><a href="#configure-class_method" title="Mocha.configure (method)">configure</a></span> Mocha’s behavior.</p>
92+
93+
<p>Methods in the <span class='object_link'><a href="Mocha/API.html" title="Mocha::API (module)">API</a></span> are directly available in <code>Test::Unit::TestCase</code>, <code>Minitest::Unit::TestCase</code>.</p>
94+
95+
<p>The mock creation methods are <span class='object_link'><a href="Mocha/API.html#mock-instance_method" title="Mocha::API#mock (method)">mock</a></span>, <span class='object_link'><a href="Mocha/API.html#stub-instance_method" title="Mocha::API#stub (method)">stub</a></span> and <span class='object_link'><a href="Mocha/API.html#stub_everything-instance_method" title="Mocha::API#stub_everything (method)">stub_everything</a></span>, all of which return a <span class='object_link'><a href="Mocha/Mock.html" title="Mocha::Mock (class)">Mock</a></span></p>
96+
97+
<p>A <span class='object_link'><a href="Mocha/Mock.html" title="Mocha::Mock (class)">Mock</a></span> <span class='object_link'><a href="Mocha/Mock.html#expects-instance_method" title="Mocha::Mock#expects (method)">expects</a></span> or <span class='object_link'><a href="Mocha/Mock.html#stubs-instance_method" title="Mocha::Mock#stubs (method)">stubs</a></span> a method, which sets up (returns) an <span class='object_link'><a href="Mocha/Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
98+
99+
<p>An <span class='object_link'><a href="Mocha/Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span> can be further qualified through its <span class='object_link'><a href="Mocha/Expectation.html" title="Mocha::Expectation (class)">fluent interface</a></span>.</p>
100+
101+
<p><span class='object_link'><a href="Mocha/ParameterMatchers.html" title="Mocha::ParameterMatchers (module)">ParameterMatchers</a></span> for <span class='object_link'><a href="Mocha/Expectation.html#with-instance_method" title="Mocha::Expectation#with (method)">Expectation#with</a></span> restrict the parameter values which will match the <span class='object_link'><a href="Mocha/Expectation.html" title="Mocha::Expectation (class)">Expectation</a></span>.</p>
102+
103+
<p>Adapters in <span class='object_link'><a href="Mocha/Integration.html" title="Mocha::Integration (module)">Integration</a></span> provide built-in support for <code>Minitest</code> and <code>Test::Unit</code>.</p>
104+
105+
<p>Integration <span class='object_link'><a href="Mocha/Hooks.html" title="Mocha::Hooks (module)">Hooks</a></span> enable support for other test frameworks.</p>
106+
107+
108+
</div>
109+
</div>
110+
<div class="tags">
111+
112+
113+
</div><h2>Defined Under Namespace</h2>
89114
<p class="children">
90115

91116

@@ -235,9 +260,9 @@ <h5 class="example_title"><div class='inline'>
235260
</div>
236261

237262
<div id="footer">
238-
Generated on Fri Jan 24 15:05:27 2025 by
263+
Generated on Tue Nov 11 14:27:03 2025 by
239264
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
240-
0.9.37 (ruby-3.4.1).
265+
0.9.37 (ruby-3.3.0).
241266
</div>
242267

243268
</div>

docs/Mocha/API.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>
77
Module: Mocha::API
88

9-
&mdash; Mocha 3.0.0-rc.1
9+
&mdash; Mocha 3.0.0-rc.2
1010

1111
</title>
1212

@@ -73,7 +73,7 @@
7373

7474
<dl>
7575
<dt>Includes:</dt>
76-
<dd><span class='object_link'><a href="Hooks.html" title="Mocha::Hooks (module)">Hooks</a></span>, <span class='object_link'><a href="ParameterMatchers.html" title="Mocha::ParameterMatchers (module)">ParameterMatchers</a></span></dd>
76+
<dd><span class='object_link'><a href="Hooks.html" title="Mocha::Hooks (module)">Hooks</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html" title="Mocha::ParameterMatchers::Methods (module)">ParameterMatchers::Methods</a></span></dd>
7777
</dl>
7878

7979

@@ -289,8 +289,8 @@ <h3 class="inherited">Methods included from <span class='object_link'><a href="H
289289

290290

291291

292-
<h3 class="inherited">Methods included from <span class='object_link'><a href="ParameterMatchers.html" title="Mocha::ParameterMatchers (module)">ParameterMatchers</a></span></h3>
293-
<p class="inherited"><span class='object_link'><a href="ParameterMatchers.html#Not-instance_method" title="Mocha::ParameterMatchers#Not (method)">#Not</a></span>, <span class='object_link'><a href="ParameterMatchers.html#all_of-instance_method" title="Mocha::ParameterMatchers#all_of (method)">#all_of</a></span>, <span class='object_link'><a href="ParameterMatchers.html#any_of-instance_method" title="Mocha::ParameterMatchers#any_of (method)">#any_of</a></span>, <span class='object_link'><a href="ParameterMatchers.html#any_parameters-instance_method" title="Mocha::ParameterMatchers#any_parameters (method)">#any_parameters</a></span>, <span class='object_link'><a href="ParameterMatchers.html#anything-instance_method" title="Mocha::ParameterMatchers#anything (method)">#anything</a></span>, <span class='object_link'><a href="ParameterMatchers.html#equals-instance_method" title="Mocha::ParameterMatchers#equals (method)">#equals</a></span>, <span class='object_link'><a href="ParameterMatchers.html#equivalent_uri-instance_method" title="Mocha::ParameterMatchers#equivalent_uri (method)">#equivalent_uri</a></span>, <span class='object_link'><a href="ParameterMatchers.html#has_entries-instance_method" title="Mocha::ParameterMatchers#has_entries (method)">#has_entries</a></span>, <span class='object_link'><a href="ParameterMatchers.html#has_entry-instance_method" title="Mocha::ParameterMatchers#has_entry (method)">#has_entry</a></span>, <span class='object_link'><a href="ParameterMatchers.html#has_key-instance_method" title="Mocha::ParameterMatchers#has_key (method)">#has_key</a></span>, <span class='object_link'><a href="ParameterMatchers.html#has_keys-instance_method" title="Mocha::ParameterMatchers#has_keys (method)">#has_keys</a></span>, <span class='object_link'><a href="ParameterMatchers.html#has_value-instance_method" title="Mocha::ParameterMatchers#has_value (method)">#has_value</a></span>, <span class='object_link'><a href="ParameterMatchers.html#includes-instance_method" title="Mocha::ParameterMatchers#includes (method)">#includes</a></span>, <span class='object_link'><a href="ParameterMatchers.html#instance_of-instance_method" title="Mocha::ParameterMatchers#instance_of (method)">#instance_of</a></span>, <span class='object_link'><a href="ParameterMatchers.html#is_a-instance_method" title="Mocha::ParameterMatchers#is_a (method)">#is_a</a></span>, <span class='object_link'><a href="ParameterMatchers.html#kind_of-instance_method" title="Mocha::ParameterMatchers#kind_of (method)">#kind_of</a></span>, <span class='object_link'><a href="ParameterMatchers.html#optionally-instance_method" title="Mocha::ParameterMatchers#optionally (method)">#optionally</a></span>, <span class='object_link'><a href="ParameterMatchers.html#regexp_matches-instance_method" title="Mocha::ParameterMatchers#regexp_matches (method)">#regexp_matches</a></span>, <span class='object_link'><a href="ParameterMatchers.html#responds_with-instance_method" title="Mocha::ParameterMatchers#responds_with (method)">#responds_with</a></span>, <span class='object_link'><a href="ParameterMatchers.html#yaml_equivalent-instance_method" title="Mocha::ParameterMatchers#yaml_equivalent (method)">#yaml_equivalent</a></span></p>
292+
<h3 class="inherited">Methods included from <span class='object_link'><a href="ParameterMatchers/Methods.html" title="Mocha::ParameterMatchers::Methods (module)">ParameterMatchers::Methods</a></span></h3>
293+
<p class="inherited"><span class='object_link'><a href="ParameterMatchers/Methods.html#Not-instance_method" title="Mocha::ParameterMatchers::Methods#Not (method)">#Not</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#all_of-instance_method" title="Mocha::ParameterMatchers::Methods#all_of (method)">#all_of</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#any_of-instance_method" title="Mocha::ParameterMatchers::Methods#any_of (method)">#any_of</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#any_parameters-instance_method" title="Mocha::ParameterMatchers::Methods#any_parameters (method)">#any_parameters</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#anything-instance_method" title="Mocha::ParameterMatchers::Methods#anything (method)">#anything</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#equals-instance_method" title="Mocha::ParameterMatchers::Methods#equals (method)">#equals</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#equivalent_uri-instance_method" title="Mocha::ParameterMatchers::Methods#equivalent_uri (method)">#equivalent_uri</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#has_entries-instance_method" title="Mocha::ParameterMatchers::Methods#has_entries (method)">#has_entries</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#has_entry-instance_method" title="Mocha::ParameterMatchers::Methods#has_entry (method)">#has_entry</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#has_key-instance_method" title="Mocha::ParameterMatchers::Methods#has_key (method)">#has_key</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#has_keys-instance_method" title="Mocha::ParameterMatchers::Methods#has_keys (method)">#has_keys</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#has_value-instance_method" title="Mocha::ParameterMatchers::Methods#has_value (method)">#has_value</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#includes-instance_method" title="Mocha::ParameterMatchers::Methods#includes (method)">#includes</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#instance_of-instance_method" title="Mocha::ParameterMatchers::Methods#instance_of (method)">#instance_of</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#is_a-instance_method" title="Mocha::ParameterMatchers::Methods#is_a (method)">#is_a</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#kind_of-instance_method" title="Mocha::ParameterMatchers::Methods#kind_of (method)">#kind_of</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#optionally-instance_method" title="Mocha::ParameterMatchers::Methods#optionally (method)">#optionally</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#regexp_matches-instance_method" title="Mocha::ParameterMatchers::Methods#regexp_matches (method)">#regexp_matches</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#responds_with-instance_method" title="Mocha::ParameterMatchers::Methods#responds_with (method)">#responds_with</a></span>, <span class='object_link'><a href="ParameterMatchers/Methods.html#yaml_equivalent-instance_method" title="Mocha::ParameterMatchers::Methods#yaml_equivalent (method)">#yaml_equivalent</a></span></p>
294294

295295

296296
<div id="instance_method_details" class="method_details_list">
@@ -1247,9 +1247,9 @@ <h5 class="example_title"><div class='inline'>
12471247
</div>
12481248

12491249
<div id="footer">
1250-
Generated on Fri Jan 24 15:05:27 2025 by
1250+
Generated on Tue Nov 11 14:27:03 2025 by
12511251
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1252-
0.9.37 (ruby-3.4.1).
1252+
0.9.37 (ruby-3.3.0).
12531253
</div>
12541254

12551255
</div>

docs/Mocha/ClassMethods.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>
77
Module: Mocha::ClassMethods
88

9-
&mdash; Mocha 3.0.0-rc.1
9+
&mdash; Mocha 3.0.0-rc.2
1010

1111
</title>
1212

@@ -248,9 +248,9 @@ <h5 class="example_title"><div class='inline'>
248248
</div>
249249

250250
<div id="footer">
251-
Generated on Fri Jan 24 15:05:27 2025 by
251+
Generated on Tue Nov 11 14:27:03 2025 by
252252
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
253-
0.9.37 (ruby-3.4.1).
253+
0.9.37 (ruby-3.3.0).
254254
</div>
255255

256256
</div>

docs/Mocha/Configuration.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<title>
77
Class: Mocha::Configuration
88

9-
&mdash; Mocha 3.0.0-rc.1
9+
&mdash; Mocha 3.0.0-rc.2
1010

1111
</title>
1212

@@ -547,7 +547,7 @@ <h3 class="signature " id="strict_keyword_argument_matching=-instance_method">
547547

548548
<p>For more details on keyword arguments in Ruby v3, refer to <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>.</p>
549549

550-
<p>Note that <code>Hash</code>-related matchers such as <span class='object_link'><a href="ParameterMatchers.html#has_value-instance_method" title="Mocha::ParameterMatchers#has_value (method)">ParameterMatchers#has_value</a></span> or <span class='object_link'><a href="ParameterMatchers.html#has_key-instance_method" title="Mocha::ParameterMatchers#has_key (method)">ParameterMatchers#has_key</a></span> will still treat a positional <code>Hash</code> and a set of keyword arguments the same, so misleading passing tests are still possible when they are used.</p>
550+
<p>Note that <code>Hash</code>-related matchers such as <span class='object_link'><a href="ParameterMatchers/Methods.html#has_value-instance_method" title="Mocha::ParameterMatchers::Methods#has_value (method)">ParameterMatchers::Methods#has_value</a></span> or <span class='object_link'><a href="ParameterMatchers/Methods.html#has_key-instance_method" title="Mocha::ParameterMatchers::Methods#has_key (method)">ParameterMatchers::Methods#has_key</a></span> will still treat a positional <code>Hash</code> and a set of keyword arguments the same, so misleading passing tests are still possible when they are used.</p>
551551

552552
<p>This configuration option is <code>false</code> by default in Ruby v2.7 to enable gradual adoption, but <code>true</code> by default in Ruby &gt;= v3.0.</p>
553553

@@ -999,9 +999,9 @@ <h5 class="example_title"><div class='inline'>
999999
</div>
10001000

10011001
<div id="footer">
1002-
Generated on Fri Jan 24 15:05:27 2025 by
1002+
Generated on Tue Nov 11 14:27:03 2025 by
10031003
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1004-
0.9.37 (ruby-3.4.1).
1004+
0.9.37 (ruby-3.3.0).
10051005
</div>
10061006

10071007
</div>

0 commit comments

Comments
 (0)