docs/file.README.html in mocha-1.9.0 vs docs/file.README.html in mocha-1.10.0.alpha

- old
+ new

@@ -4,11 +4,11 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> File: README - &mdash; Mocha 1.9.0 + &mdash; Mocha 1.10.0.alpha </title> <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" /> @@ -60,16 +60,20 @@ <div id="content"><div id='filecontents'><h2>Mocha <a href="https://travis-ci.org/freerange/mocha"><img src="https://travis-ci.org/freerange/mocha.svg?branch=master" alt="Build Status"></a> <a href="http://badge.fury.io/rb/mocha"><img src="https://badge.fury.io/rb/mocha.svg" alt="Gem Version"></a> <a href="https://dependabot.com/compatibility-score.html?dependency-name=mocha&package-manager=bundler&version-scheme=semver"><img src="https://api.dependabot.com/badges/compatibility_score?dependency-name=mocha&package-manager=bundler&version-scheme=semver" alt="SemVer"></a></h2> <h3>Description</h3> <ul> -<li>A Ruby library for mocking and stubbing.</li> +<li>A Ruby library for <a href="http://xunitpatterns.com/Mock%20Object.html">mocking</a> and <a href="http://xunitpatterns.com/Test%20Stub.html">stubbing</a> - but deliberately not (yet) <a href="http://xunitpatterns.com/Fake%20Object.html">faking</a> or <a href="http://xunitpatterns.com/Test%20Spy.html">spying</a>.</li> <li>A unified, simple and readable syntax for both full &amp; partial mocking.</li> <li>Built-in support for MiniTest and Test::Unit.</li> <li>Supported by many other test frameworks.</li> </ul> +<h3>Intended Usage</h3> + +<p>Mocha is intended to be used in unit tests for the <a href="http://xunitpatterns.com/Mock%20Object.html">Mock Object</a> or <a href="http://xunitpatterns.com/Test%20Stub.html">Test Stub</a> types of <a href="http://xunitpatterns.com/Test%20Double.html">Test Double</a>, not the <a href="http://xunitpatterns.com/Fake%20Object.html">Fake Object</a> or <a href="http://xunitpatterns.com/Test%20Spy.html">Test Spy</a> types. Although it would be possible to extend Mocha to allow the implementation of fakes and spies, we have chosen to keep it focused on mocks and stubs.</p> + <h3>Installation</h3> <h4>Gem</h4> <p>Install the latest version of the gem with the following command...</p> @@ -145,19 +149,10 @@ <span class='kw'>end</span> </code></pre> <p>Note: There is no need to use a require statement to setup Mocha; RSpec does this itself.</p> -<h4>Rails Plugin</h4> - -<p>Install the Rails plugin...</p> - -<pre class="code ruby"><code class="ruby">$ rails plugin install git://github.com/freerange/mocha.git -</code></pre> - -<p>Note: As of version 0.9.8, the Mocha plugin is not automatically setup at plugin load time. Instead it must be manually setup e.g. at the bottom of your <code>test_helper.rb</code>.</p> - <h5>MiniTest</h5> <pre class="code ruby"><code class="ruby"><span class='comment'># At bottom of test_helper.rb (or at least after `require &#39;rails/test_help&#39;`) </span><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mocha/minitest</span><span class='tstring_end'>&#39;</span></span> </code></pre> @@ -169,11 +164,10 @@ <li>Since v1.1.0 Mocha has used prepended modules internally for stubbing methods. There is <a href="https://bugs.ruby-lang.org/issues/12876">an obscure Ruby bug</a> in many (but not all) versions of Ruby between v2.0 &amp; v2.3 which under certain circumstances may cause your Ruby interpreter to hang. See the Ruby bug report for more details. The bug has been fixed in Ruby v2.3.3 &amp; v2.4.0.</li> <li>Stubbing an aliased class method, where the original method is defined in a module that&#39;s used to <code>extend</code> the class doesn&#39;t work in Ruby 1.8.x. See stub_method_defined_on_module_and_aliased_test.rb for an example of this behaviour.</li> <li>0.13.x versions cause a harmless, but annoying, deprecation warning when used with Rails 3.2.0-3.2.12, 3.1.0-3.1.10 &amp; 3.0.0-3.0.19.</li> <li>0.11.x versions don&#39;t work with Rails 3.2.13 (<code>TypeError: superclass mismatch for class ExpectationError</code>). See #115.</li> <li>Versions 0.10.2, 0.10.3 &amp; 0.11.0 of the Mocha gem were broken. Please do not use these versions.</li> -<li>Versions 0.9.6 &amp; 0.9.7 of the Mocha Rails plugin were broken. Please do not use these versions.</li> </ul> <h3>Usage</h3> <h4>Quick Start</h4> @@ -339,10 +333,19 @@ <li>stubbing a non-public method</li> </ul> <p>See the <a href="https://mocha.jamesmead.org/Mocha/Configuration.html">documentation</a> for <code>Mocha::Configuration</code> for further details.</p> +<h5>MOCHA_OPTIONS</h5> + +<p><code>MOCHA_OPTIONS</code> is an environment variable whose value can be set to a comma-separated list, so that we can specify multiple options e.g. <code>MOCHA_OPTIONS=debug,use_test_unit_gem</code>. +Only the following values are currently recognized and have an effect:</p> + +<ul> +<li><code>debug</code>: Enables a debug mode which will output backtraces for each deprecation warning. This is useful for finding where in the test suite the deprecated calls are.</li> +</ul> + <h3>Useful Links</h3> <ul> <li><a href="https://mocha.jamesmead.org">Official Documentation</a></li> <li><a href="http://github.com/freerange/mocha">Source Code</a></li> @@ -365,11 +368,11 @@ <li>Update the RELEASE.md file with a summary of changes</li> <li>Bump the version in <code>lib/mocha/version.rb</code></li> <li>Commit &amp; push to GitHub</li> <li><p>Check Travis CI build is passing - <a href="https://travis-ci.org/freerange/mocha">https://travis-ci.org/freerange/mocha</a></p></li> <li><p>Sign in to Google Analytics - <a href="https://analytics.google.com/analytics/web/">https://analytics.google.com/analytics/web/</a></p></li> -<li><p>Find the web property ID for Go Free Range Ltd &gt; Mocha Documentation (UA-625523-7)</p></li> +<li><p>Find the web property ID for floehopper (625523) &gt; Mocha Documentation (UA-625523-7)</p></li> <li><p>Generate documentation:</p></li> </ul> <pre class="code bash"><code class="bash">$ MOCHA_GENERATE_DOCS=true bundle install @@ -414,12 +417,12 @@ gtag('config', 'UA-625523-7'); </script> </div> <div id="footer"> - Generated on Mon Jun 17 18:38:43 2019 by + Generated on Sun Nov 24 15:26:48 2019 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.9.19 (ruby-2.5.3). + 0.9.20 (ruby-2.6.5). </div> </div> </body> </html> \ No newline at end of file