|
6 | 6 | <title> |
7 | 7 | Module: Mocha |
8 | 8 |
|
9 | | - — Mocha 3.0.0-rc.1 |
| 9 | + — Mocha 3.0.0-rc.2 |
10 | 10 |
|
11 | 11 | </title> |
12 | 12 |
|
|
78 | 78 |
|
79 | 79 | <dl> |
80 | 80 | <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> |
83 | 83 | </dd> |
84 | 84 | </dl> |
85 | 85 |
|
86 | 86 | </div> |
87 | 87 |
|
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> |
89 | 114 | <p class="children"> |
90 | 115 |
|
91 | 116 |
|
@@ -235,9 +260,9 @@ <h5 class="example_title"><div class='inline'> |
235 | 260 | </div> |
236 | 261 |
|
237 | 262 | <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 |
239 | 264 | <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). |
241 | 266 | </div> |
242 | 267 |
|
243 | 268 | </div> |
|
0 commit comments