Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update docs for 2.2.0 release

  • Loading branch information...
commit f130616dd3532b15a9d84879fd09e0396fb16c58 1 parent 58d26ee
@blowmage authored
Showing with 1,457 additions and 107 deletions.
  1. +1 −1  ActionController.html
  2. +260 −5 ActionController/TestCase.html
  3. +1 −1  ActionDispatch.html
  4. +3 −3 ActionDispatch/IntegrationTest.html
  5. +1 −1  ActionMailer.html
  6. +2 −2 ActionMailer/TestCase.html
  7. +1 −1  ActionView.html
  8. +3 −3 ActionView/TestCase.html
  9. +95 −0 ActiveJob.html
  10. +469 −0 ActiveJob/TestCase.html
  11. +1 −1  ActiveSupport.html
  12. +1 −1  ActiveSupport/TestCase.html
  13. +1 −1  ActiveSupport/TestCase/ActiveRecord.html
  14. +16 −1 CHANGELOG_rdoc.html
  15. +8 −1 Manifest_txt.html
  16. +1 −1  Minitest.html
  17. +1 −1  Minitest/Rails.html
  18. +1 −1  Minitest/Rails/ConstantLookup.html
  19. +346 −55 Minitest/Rails/Expectations.html
  20. +122 −0 Minitest/Rails/Expectations/ActiveJob.html
  21. +1 −1  Minitest/Rails/Railtie.html
  22. +1 −1  Minitest/Rails/Railtie/Rake.html
  23. +1 −1  README_rdoc.html
  24. +1 −1  Rails.html
  25. +1 −1  Rails/Generators.html
  26. +2 −2 Rails/Generators/TestCase.html
  27. +11 −11 created.rid
  28. +5 −1 index.html
  29. BIN  js/navigation.js.gz
  30. +1 −1  js/search_index.js
  31. BIN  js/search_index.js.gz
  32. BIN  js/searcher.js.gz
  33. +99 −7 table_of_contents.html
View
2  ActionController.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module ActionController - minitest-rails-2.1.1 Documentation</title>
+<title>module ActionController - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
View
265 ActionController/TestCase.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>class ActionController::TestCase - minitest-rails-2.1.1 Documentation</title>
+<title>class ActionController::TestCase - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
@@ -98,6 +98,18 @@
<li ><a href="#method-i-assert_template">#assert_template</a>
+ <li ><a href="#method-i-delete">#delete</a>
+
+ <li ><a href="#method-i-get">#get</a>
+
+ <li ><a href="#method-i-head">#head</a>
+
+ <li ><a href="#method-i-patch">#patch</a>
+
+ <li ><a href="#method-i-post">#post</a>
+
+ <li ><a href="#method-i-put">#put</a>
+
<li ><a href="#method-i-refute_dom_equal">#refute_dom_equal</a>
<li ><a href="#method-i-refute_tag">#refute_tag</a>
@@ -357,8 +369,7 @@ <h1 id="class-ActionController::TestCase" class="class">
<span class="ruby-identifier">children</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">count</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">3</span>, <span class="ruby-identifier">only</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;img&quot;</span> } }
</pre>
-<p>See also <a
-href="../Minitest/Rails/Expectations.html#method-i-wont_have_tag">Minitest::Rails::Expectations#wont_have_tag</a></p>
+<p>See also Minitest::Rails::Expectations#wont_have_tag</p>
@@ -1116,6 +1127,251 @@ <h3 id="method-i-assert_select-label-Equality+Tests">Equality Tests<span><a href
</div>
+ <div id="method-i-delete" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ delete(action, *args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Simulate a DELETE request with the given parameters and set/volley the
+response. See <code>get</code> for more details.</p>
+
+
+
+
+ <div class="method-source-code" id="delete-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 592</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-get" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ get(action, *args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Simulate a GET request with the given parameters.</p>
+<ul><li>
+<p><code>action</code>: The controller action to call.</p>
+</li><li>
+<p><code>params</code>: The hash with HTTP parameters that you want to pass.
+This may be</p>
+</li></ul>
+
+<p><code>nil</code>.</p>
+<ul><li>
+<p><code>body</code>: The request body with a string that is appropriately
+encoded (<code>application/x-www-form-urlencoded</code> or
+<code>multipart/form-data</code>).</p>
+</li><li>
+<p><code>session</code>: A hash of parameters to store in the session. This
+may be</p>
+</li></ul>
+
+<p><code>nil</code>.</p>
+<ul><li>
+<p><code>flash</code>: A hash of parameters to store in the flash. This may be
+<code>nil</code>.</p>
+</li></ul>
+
+<p>You can also simulate POST, PATCH, PUT, DELETE, and HEAD requests with
+<code>post</code>, <code>patch</code>, <code>put</code>,
+<code>delete</code>, and <code>head</code>. Example sending parameters,
+session and setting a flash message:</p>
+
+<pre class="ruby"><span class="ruby-identifier">get</span> :<span class="ruby-identifier">show</span>,
+ <span class="ruby-identifier">params</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-value">7</span> },
+ <span class="ruby-identifier">session</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">user_id</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span> },
+ <span class="ruby-identifier">flash</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;This is a flash message&#39;</span> }
+</pre>
+
+<p>Note that the request method is not verified. The different methods are
+available to make the tests more expressive.</p>
+
+
+
+
+ <div class="method-source-code" id="get-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 560</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-head" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ head(action, *args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Simulate a HEAD request with the given parameters and set/volley the
+response. See <code>get</code> for more details.</p>
+
+
+
+
+ <div class="method-source-code" id="head-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 599</span>
+</pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-patch" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ patch(action, *args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Simulate a PATCH request with the given parameters and set/volley the
+response. See <code>get</code> for more details.</p>
+
+
+
+
+ <div class="method-source-code" id="patch-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 576</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-post" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ post(action, *args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Simulate a POST request with the given parameters and set/volley the
+response. See <code>get</code> for more details.</p>
+
+
+
+
+ <div class="method-source-code" id="post-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 568</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-put" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ put(action, *args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Simulate a PUT request with the given parameters and set/volley the
+response. See <code>get</code> for more details.</p>
+
+
+
+
+ <div class="method-source-code" id="put-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 584</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
<div id="method-i-refute_dom_equal" class="method-detail method-alias">
<div class="method-heading">
@@ -1185,8 +1441,7 @@ <h3 id="method-i-assert_select-label-Equality+Tests">Equality Tests<span><a href
<span class="ruby-identifier">children</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">count</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">3</span>, <span class="ruby-identifier">only</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;img&quot;</span> } }
</pre>
-<p>See also <a
-href="../Minitest/Rails/Expectations.html#method-i-wont_have_tag">Minitest::Rails::Expectations#wont_have_tag</a></p>
+<p>See also Minitest::Rails::Expectations#wont_have_tag</p>
<p>:method: <a href="TestCase.html#method-i-refute_tag">#refute_tag</a>
:call-seq: <a
View
2  ActionDispatch.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module ActionDispatch - minitest-rails-2.1.1 Documentation</title>
+<title>module ActionDispatch - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
View
6 ActionDispatch/IntegrationTest.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>class ActionDispatch::IntegrationTest - minitest-rails-2.1.1 Documentation</title>
+<title>class ActionDispatch::IntegrationTest - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
@@ -141,7 +141,7 @@ <h1 id="class-ActionDispatch::IntegrationTest" class="class">
<div class="method-source-code" id="assert_difference-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1078</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1146</span>
</pre>
</div>
@@ -184,7 +184,7 @@ <h1 id="class-ActionDispatch::IntegrationTest" class="class">
<div class="method-source-code" id="assert_no_difference-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1090</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1158</span>
</pre>
</div>
View
2  ActionMailer.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module ActionMailer - minitest-rails-2.1.1 Documentation</title>
+<title>module ActionMailer - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
View
4 ActionMailer/TestCase.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>class ActionMailer::TestCase - minitest-rails-2.1.1 Documentation</title>
+<title>class ActionMailer::TestCase - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
@@ -125,7 +125,7 @@ <h1 id="class-ActionMailer::TestCase" class="class">
<div class="method-source-code" id="determine_default_mailer-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails.rb, line 92</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails.rb, line 105</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">determine_default_mailer</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-identifier">mailer</span> = <span class="ruby-identifier">determine_constant_from_test_name</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">constant</span><span class="ruby-operator">|</span>
<span class="ruby-constant">Class</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">constant</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">constant</span> <span class="ruby-operator">&lt;</span> <span class="ruby-operator">::</span><span class="ruby-constant">ActionMailer</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>
View
2  ActionView.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module ActionView - minitest-rails-2.1.1 Documentation</title>
+<title>module ActionView - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
View
6 ActionView/TestCase.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>class ActionView::TestCase - minitest-rails-2.1.1 Documentation</title>
+<title>class ActionView::TestCase - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
@@ -186,7 +186,7 @@ <h1 id="class-ActionView::TestCase" class="class">
<div class="method-source-code" id="assert_difference-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 546</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 614</span>
</pre>
</div>
@@ -229,7 +229,7 @@ <h1 id="class-ActionView::TestCase" class="class">
<div class="method-source-code" id="assert_no_difference-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 558</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 626</span>
</pre>
</div>
View
95 ActiveJob.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<meta charset="UTF-8">
+
+<title>module ActiveJob - minitest-rails-2.2.0 Documentation</title>
+
+<script type="text/javascript">
+ var rdoc_rel_prefix = "./";
+</script>
+
+<script src="./js/jquery.js"></script>
+<script src="./js/darkfish.js"></script>
+
+<link href="./css/fonts.css" rel="stylesheet">
+<link href="./css/rdoc.css" rel="stylesheet">
+
+
+
+<body id="top" role="document" class="module">
+<nav role="navigation">
+ <div id="project-navigation">
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
+ <h2>
+ <a href="./index.html" rel="home">Home</a>
+ </h2>
+
+ <div id="table-of-contents-navigation">
+ <a href="./table_of_contents.html#pages">Pages</a>
+ <a href="./table_of_contents.html#classes">Classes</a>
+ <a href="./table_of_contents.html#methods">Methods</a>
+ </div>
+</div>
+
+ <div id="search-section" role="search" class="project-section initially-hidden">
+ <form action="#" method="get" accept-charset="utf-8">
+ <div id="search-field-wrapper">
+ <input id="search-field" role="combobox" aria-label="Search"
+ aria-autocomplete="list" aria-controls="search-results"
+ type="text" name="search" placeholder="Search" spellcheck="false"
+ title="Type to search, Up and Down to navigate, Enter to load">
+ </div>
+
+ <ul id="search-results" aria-label="Search Results"
+ aria-busy="false" aria-expanded="false"
+ aria-atomic="false" class="initially-hidden"></ul>
+ </form>
+</div>
+
+ </div>
+
+
+
+ <div id="class-metadata">
+
+
+
+
+
+ </div>
+</nav>
+
+<main role="main" aria-labelledby="module-ActiveJob">
+ <h1 id="module-ActiveJob" class="module">
+ module ActiveJob
+ </h1>
+
+ <section class="description">
+
+ </section>
+
+
+
+
+ <section id="5Buntitled-5D" class="documentation-section">
+
+
+
+
+
+
+
+
+
+ </section>
+</main>
+
+
+<footer id="validator-badges" role="contentinfo">
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
+</footer>
+
View
469 ActiveJob/TestCase.html
@@ -0,0 +1,469 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<meta charset="UTF-8">
+
+<title>class ActiveJob::TestCase - minitest-rails-2.2.0 Documentation</title>
+
+<script type="text/javascript">
+ var rdoc_rel_prefix = "../";
+</script>
+
+<script src="../js/jquery.js"></script>
+<script src="../js/darkfish.js"></script>
+
+<link href="../css/fonts.css" rel="stylesheet">
+<link href="../css/rdoc.css" rel="stylesheet">
+
+
+
+<body id="top" role="document" class="class">
+<nav role="navigation">
+ <div id="project-navigation">
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
+ <h2>
+ <a href="../index.html" rel="home">Home</a>
+ </h2>
+
+ <div id="table-of-contents-navigation">
+ <a href="../table_of_contents.html#pages">Pages</a>
+ <a href="../table_of_contents.html#classes">Classes</a>
+ <a href="../table_of_contents.html#methods">Methods</a>
+ </div>
+</div>
+
+ <div id="search-section" role="search" class="project-section initially-hidden">
+ <form action="#" method="get" accept-charset="utf-8">
+ <div id="search-field-wrapper">
+ <input id="search-field" role="combobox" aria-label="Search"
+ aria-autocomplete="list" aria-controls="search-results"
+ type="text" name="search" placeholder="Search" spellcheck="false"
+ title="Type to search, Up and Down to navigate, Enter to load">
+ </div>
+
+ <ul id="search-results" aria-label="Search Results"
+ aria-busy="false" aria-expanded="false"
+ aria-atomic="false" class="initially-hidden"></ul>
+ </form>
+</div>
+
+ </div>
+
+
+
+ <div id="class-metadata">
+
+ <div id="parent-class-section" class="nav-section">
+ <h3>Parent</h3>
+
+
+ <p class="link">Object
+
+</div>
+
+
+
+ <!-- Method Quickref -->
+<div id="method-list-section" class="nav-section">
+ <h3>Methods</h3>
+
+ <ul class="link-list" role="directory">
+
+ <li ><a href="#method-i-assert_enqueued_jobs">#assert_enqueued_jobs</a>
+
+ <li ><a href="#method-i-assert_enqueued_with">#assert_enqueued_with</a>
+
+ <li ><a href="#method-i-assert_no_enqueued_jobs">#assert_no_enqueued_jobs</a>
+
+ <li ><a href="#method-i-assert_no_performed_jobs">#assert_no_performed_jobs</a>
+
+ <li ><a href="#method-i-assert_performed_jobs">#assert_performed_jobs</a>
+
+ <li ><a href="#method-i-assert_performed_with">#assert_performed_with</a>
+
+ </ul>
+</div>
+
+ </div>
+</nav>
+
+<main role="main" aria-labelledby="class-ActiveJob::TestCase">
+ <h1 id="class-ActiveJob::TestCase" class="class">
+ class ActiveJob::TestCase
+ </h1>
+
+ <section class="description">
+
+ </section>
+
+
+
+
+ <section id="5Buntitled-5D" class="documentation-section">
+
+
+
+
+
+
+
+
+
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
+ <header>
+ <h3>Public Instance Methods</h3>
+ </header>
+
+
+ <div id="method-i-assert_enqueued_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ assert_enqueued_jobs(number)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Asserts that the number of enqueued jobs matches the given number.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">0</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;david&#39;</span>)
+ <span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">1</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;abdelkader&#39;</span>)
+ <span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">2</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>If a block is passed, that block should cause the specified number of jobs
+to be enqueued.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">1</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;cristian&#39;</span>)
+ <span class="ruby-keyword">end</span>
+
+ <span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">2</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;aaron&#39;</span>)
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;rafael&#39;</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also <a
+href="../Minitest/Rails/Expectations.html#method-i-must_enqueue_jobs">Minitest::Rails::Expectations#must_enqueue_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="assert_enqueued_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1696</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-assert_enqueued_with" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ assert_enqueued_with(args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Asserts that the job passed in the block has been enqueued with the given
+arguments.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_assert_enqueued_with</span>
+ <span class="ruby-identifier">assert_enqueued_with</span>(<span class="ruby-identifier">job</span><span class="ruby-operator">:</span> <span class="ruby-constant">MyJob</span>, <span class="ruby-identifier">args</span><span class="ruby-operator">:</span> [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>], <span class="ruby-identifier">queue</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;low&#39;</span>) <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">MyJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also <a
+href="../Minitest/Rails/Expectations.html#method-i-must_enqueue_with">Minitest::Rails::Expectations#must_enqueue_with</a></p>
+
+
+
+
+ <div class="method-source-code" id="assert_enqueued_with-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1803</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-assert_no_enqueued_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ assert_no_enqueued_jobs(number)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Asserts that no jobs have been enqueued.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">assert_no_enqueued_jobs</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;jeremy&#39;</span>)
+ <span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">1</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>If a block is passed, that block should not cause any job to be enqueued.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">assert_no_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-comment"># No job should be enqueued from this block</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>Note: This assertion is simply a shortcut for:</p>
+
+<pre class="ruby"><span class="ruby-identifier">assert_enqueued_jobs</span> <span class="ruby-value">0</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
+</pre>
+
+<p>See also <a
+href="../Minitest/Rails/Expectations.html#method-i-wont_enqueue_jobs">Minitest::Rails::Expectations#wont_enqueue_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="assert_no_enqueued_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1722</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-assert_no_performed_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ assert_no_performed_jobs(number)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Asserts that no jobs have been performed.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">assert_no_performed_jobs</span>
+
+ <span class="ruby-identifier">perform_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;matthew&#39;</span>)
+ <span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">1</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>If a block is passed, that block should not cause any job to be performed.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">assert_no_performed_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-comment"># No job should be performed from this block</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>Note: This assertion is simply a shortcut for:</p>
+
+<pre class="ruby"><span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">0</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
+</pre>
+
+<p>See also <a
+href="../Minitest/Rails/Expectations.html#method-i-wont_perform_jobs">Minitest::Rails::Expectations#wont_perform_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="assert_no_performed_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1789</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-assert_performed_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ assert_performed_jobs(number)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Asserts that the number of performed jobs matches the given number. If no
+block is passed, <code>perform_enqueued_jobs</code>d must be called around
+the job call.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">0</span>
+
+ <span class="ruby-identifier">perform_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;xavier&#39;</span>)
+ <span class="ruby-keyword">end</span>
+ <span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">1</span>
+
+ <span class="ruby-identifier">perform_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;yves&#39;</span>)
+ <span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">2</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>If a block is passed, that block should cause the specified number of jobs
+to be performed.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">1</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;robin&#39;</span>)
+ <span class="ruby-keyword">end</span>
+
+ <span class="ruby-identifier">assert_performed_jobs</span> <span class="ruby-value">2</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;carlos&#39;</span>)
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;sean&#39;</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also <a
+href="../Minitest/Rails/Expectations.html#method-i-must_perform_jobs">Minitest::Rails::Expectations#must_perform_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="assert_performed_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1760</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-assert_performed_with" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ assert_performed_with(args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Asserts that the job passed in the block has been performed with the given
+arguments.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_assert_performed_with</span>
+ <span class="ruby-identifier">assert_performed_with</span>(<span class="ruby-identifier">job</span><span class="ruby-operator">:</span> <span class="ruby-constant">MyJob</span>, <span class="ruby-identifier">args</span><span class="ruby-operator">:</span> [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>], <span class="ruby-identifier">queue</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;high&#39;</span>) <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">MyJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also <a
+href="../Minitest/Rails/Expectations.html#method-i-must_perform_with">Minitest::Rails::Expectations#must_perform_with</a></p>
+
+
+
+
+ <div class="method-source-code" id="assert_performed_with-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/assertions.rb, line 1816</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ </section>
+
+ </section>
+</main>
+
+
+<footer id="validator-badges" role="contentinfo">
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.0.
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
+</footer>
+
View
2  ActiveSupport.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module ActiveSupport - minitest-rails-2.1.1 Documentation</title>
+<title>module ActiveSupport - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
View
2  ActiveSupport/TestCase.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>class ActiveSupport::TestCase - minitest-rails-2.1.1 Documentation</title>
+<title>class ActiveSupport::TestCase - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
View
2  ActiveSupport/TestCase/ActiveRecord.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module ActiveSupport::TestCase::ActiveRecord - minitest-rails-2.1.1 Documentation</title>
+<title>module ActiveSupport::TestCase::ActiveRecord - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../../";
View
17 CHANGELOG_rdoc.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>CHANGELOG - minitest-rails-2.1.1 Documentation</title>
+<title>CHANGELOG - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
@@ -55,6 +55,7 @@
<h3>Table of Contents</h3>
<ul class="link-list" role="directory">
+ <li><a href="#label-2.2.0+-2F+2015-05-29">2.2.0 / 2015-05-29</a>
<li><a href="#label-2.1.1+-2F+2014-10-28">2.1.1 / 2014-10-28</a>
<li><a href="#label-2.1.0+-2F+2014-07-08">2.1.0 / 2014-07-08</a>
<li><a href="#label-2.0.3+-2F+2014-06-11">2.0.3 / 2014-06-11</a>
@@ -105,6 +106,20 @@
<main role="main" aria-label="Page CHANGELOG.rdoc">
+<h3 id="label-2.2.0+-2F+2015-05-29">2.2.0 / 2015-05-29<span><a href="#label-2.2.0+-2F+2015-05-29">&para;</a> <a href="#top">&uarr;</a></span></h3>
+<ul><li>
+<p>Update to <a href="Minitest.html">Minitest</a> 5.7</p>
+</li><li>
+<p>Use Value Monad for Expectations</p>
+</li><li>
+<p>Active Job support (liseki)</p>
+</li><li>
+<p>Documentation improvements (WendyBeth)</p>
+</li></ul>
+
+<p><a
+href="https://github.com/blowmage/minitest-rails/compare/v2.1.1...v2.2.0">github.com/blowmage/minitest-rails/compare/v2.1.1…v2.2.0</a></p>
+
<h3 id="label-2.1.1+-2F+2014-10-28">2.1.1 / 2014-10-28<span><a href="#label-2.1.1+-2F+2014-10-28">&para;</a> <a href="#top">&uarr;</a></span></h3>
<ul><li>
<p>Fix scaffold generator to use accessor instead of ivar (isaacsloan)</p>
View
9 Manifest_txt.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>Manifest - minitest-rails-2.1.1 Documentation</title>
+<title>Manifest - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
@@ -91,6 +91,9 @@
lib/generators/minitest/integration/integration_generator.rb
lib/generators/minitest/integration/templates/integration_spec.rb
lib/generators/minitest/integration/templates/integration_test.rb
+lib/generators/minitest/job/job_generator.rb
+lib/generators/minitest/job/templates/job_spec.rb
+lib/generators/minitest/job/templates/job_test.rb
lib/generators/minitest/mailer/mailer_generator.rb
lib/generators/minitest/mailer/templates/mailer_spec.rb
lib/generators/minitest/mailer/templates/mailer_test.rb
@@ -113,6 +116,7 @@
test/generators/test_generator_generator.rb
test/generators/test_helper_generator.rb
test/generators/test_install_generator.rb
+test/generators/test_job_generator.rb
test/generators/test_mailer_generator.rb
test/generators/test_model_generator.rb
test/generators/test_route_generator.rb
@@ -126,6 +130,9 @@
test/rails/action_mailer/test_spec_type.rb
test/rails/action_view/test_helpers.rb
test/rails/action_view/test_spec_type.rb
+test/rails/active_job/test_assertions.rb
+test/rails/active_job/test_expectations.rb
+test/rails/active_job/test_spec_type.rb
test/rails/active_support/test_assertions.rb
test/rails/active_support/test_expectations.rb
test/rails/active_support/test_spec_type.rb
View
2  Minitest.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module Minitest - minitest-rails-2.1.1 Documentation</title>
+<title>module Minitest - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "./";
View
2  Minitest/Rails.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module Minitest::Rails - minitest-rails-2.1.1 Documentation</title>
+<title>module Minitest::Rails - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
View
2  Minitest/Rails/ConstantLookup.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module Minitest::Rails::ConstantLookup - minitest-rails-2.1.1 Documentation</title>
+<title>module Minitest::Rails::ConstantLookup - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../../";
View
401 Minitest/Rails/Expectations.html
@@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
-<title>module Minitest::Rails::Expectations - minitest-rails-2.1.1 Documentation</title>
+<title>module Minitest::Rails::Expectations - minitest-rails-2.2.0 Documentation</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../../";
@@ -67,8 +67,16 @@
<li ><a href="#method-i-must_dom_equal">#must_dom_equal</a>
+ <li ><a href="#method-i-must_enqueue_jobs">#must_enqueue_jobs</a>
+
+ <li ><a href="#method-i-must_enqueue_with">#must_enqueue_with</a>
+
<li ><a href="#method-i-must_have_tag">#must_have_tag</a>
+ <li ><a href="#method-i-must_perform_jobs">#must_perform_jobs</a>
+
+ <li ><a href="#method-i-must_perform_with">#must_perform_with</a>
+
<li ><a href="#method-i-must_redirect_to">#must_redirect_to</a>
<li ><a href="#method-i-must_render_template">#must_render_template</a>
@@ -89,7 +97,9 @@
<li ><a href="#method-i-wont_dom_equal">#wont_dom_equal</a>
- <li ><a href="#method-i-wont_have_tag">#wont_have_tag</a>
+ <li ><a href="#method-i-wont_enqueue_jobs">#wont_enqueue_jobs</a>
+
+ <li ><a href="#method-i-wont_perform_jobs">#wont_perform_jobs</a>
</ul>
</div>
@@ -141,10 +151,10 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<p>Checks the numeric difference between the return value of an expression as
a result of what is evaluated.</p>
-<pre class="ruby"><span class="ruby-identifier">lambda</span> { <span class="ruby-constant">User</span>.<span class="ruby-identifier">create</span> <span class="ruby-identifier">password</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;valid&quot;</span> }.<span class="ruby-identifier">must_change</span> <span class="ruby-string">&quot;User.count&quot;</span>
-<span class="ruby-identifier">lambda</span> { <span class="ruby-value">3</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword">do</span>
- <span class="ruby-constant">User</span>.<span class="ruby-identifier">create</span> <span class="ruby-identifier">password</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;valid&quot;</span>
- <span class="ruby-keyword">end</span> }.<span class="ruby-identifier">must_change</span> <span class="ruby-string">&quot;User.count&quot;</span>, <span class="ruby-value">3</span>
+<pre class="ruby"><span class="ruby-identifier">value</span> { <span class="ruby-constant">User</span>.<span class="ruby-identifier">create</span> <span class="ruby-identifier">password</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;valid&quot;</span> }.<span class="ruby-identifier">must_change</span> <span class="ruby-string">&quot;User.count&quot;</span>
+<span class="ruby-identifier">value</span> { <span class="ruby-value">3</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">User</span>.<span class="ruby-identifier">create</span> <span class="ruby-identifier">password</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;valid&quot;</span>
+ <span class="ruby-keyword">end</span> }.<span class="ruby-identifier">must_change</span> <span class="ruby-string">&quot;User.count&quot;</span>, <span class="ruby-value">3</span>
</pre>
<p>See also <a
@@ -154,8 +164,8 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_change-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 19</span>
-<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:assert_difference</span>, <span class="ruby-value">:must_change</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 21</span>
+<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:assert_difference</span>, <span class="ruby-value">:must_change</span>, <span class="ruby-value">:block</span>
</pre>
</div>
@@ -186,7 +196,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
evaluated.</p>
<pre class="ruby"><span class="ruby-identifier">apple_link</span> = <span class="ruby-string">&#39;&lt;a href=&quot;http://www.example.com&quot;&gt;Apples&lt;/a&gt;&#39;</span>
-<span class="ruby-identifier">link_to</span>(<span class="ruby-string">&quot;Apples&quot;</span>, <span class="ruby-string">&quot;http://www.example.com&quot;</span>).<span class="ruby-identifier">must_dom_equal</span> <span class="ruby-identifier">apple_link</span>
+<span class="ruby-identifier">value</span>(<span class="ruby-identifier">link_to</span>(<span class="ruby-string">&quot;Apples&quot;</span>, <span class="ruby-string">&quot;http://www.example.com&quot;</span>)).<span class="ruby-identifier">must_dom_equal</span> <span class="ruby-identifier">apple_link</span>
</pre>
<p>See also <a
@@ -198,7 +208,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_dom_equal-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 392</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 394</span>
<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:assert_dom_equal</span>, <span class="ruby-value">:must_dom_equal</span>
</pre>
</div>
@@ -211,6 +221,111 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
</div>
+ <div id="method-i-must_enqueue_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ must_enqueue_jobs(number)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Expects that the number of enqueued jobs matches the given number.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">0</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;david&#39;</span>)
+ <span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">1</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;abdelkader&#39;</span>)
+ <span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">2</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>If a block is passed, that block should cause the specified number of jobs
+to be enqueued.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">1</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;cristian&#39;</span>)
+ <span class="ruby-keyword">end</span>
+
+ <span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">2</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;aaron&#39;</span>)
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;rafael&#39;</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also <a
+href="../../ActiveJob/TestCase.html#method-i-assert_enqueued_jobs">ActiveJob::TestCase#assert_enqueued_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="must_enqueue_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 571</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-must_enqueue_with" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ must_enqueue_with(args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Expects that the job passed in the block has been enqueued with the given
+arguments.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_must_enqueue_with</span>
+ <span class="ruby-identifier">must_enqueue_with</span>(<span class="ruby-identifier">job</span><span class="ruby-operator">:</span> <span class="ruby-constant">MyJob</span>, <span class="ruby-identifier">args</span><span class="ruby-operator">:</span> [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>], <span class="ruby-identifier">queue</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;low&#39;</span>) <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">MyJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also Minitest::Rails::Expectations#assert_enqueued_with</p>
+
+
+
+
+ <div class="method-source-code" id="must_enqueue_with-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 678</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
<div id="method-i-must_have_tag" class="method-detail ">
@@ -358,7 +473,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_have_tag-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 509</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 511</span>
</pre>
</div>
@@ -370,6 +485,119 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
</div>
+ <div id="method-i-must_perform_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ must_perform_jobs(number)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Expects that the number of performed jobs matches the given number. If no
+block is passed, <code>perform_enqueued_jobs</code>d must be called around
+the job call.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">0</span>
+
+ <span class="ruby-identifier">perform_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;xavier&#39;</span>)
+ <span class="ruby-keyword">end</span>
+ <span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">1</span>
+
+ <span class="ruby-identifier">perform_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;yves&#39;</span>)
+ <span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">2</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>If a block is passed, that block should cause the specified number of jobs
+to be performed.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">1</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;robin&#39;</span>)
+ <span class="ruby-keyword">end</span>
+
+ <span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">2</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;carlos&#39;</span>)
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;sean&#39;</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also <a
+href="../../ActiveJob/TestCase.html#method-i-assert_performed_jobs">ActiveJob::TestCase#assert_performed_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="must_perform_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 635</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
+ <div id="method-i-must_perform_with" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ must_perform_with(args)
+ </span>
+
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Expects that the job passed in the block has been performed with the given
+arguments.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_must_perform_with</span>
+ <span class="ruby-identifier">must_perform_with</span>(<span class="ruby-identifier">job</span><span class="ruby-operator">:</span> <span class="ruby-constant">MyJob</span>, <span class="ruby-identifier">args</span><span class="ruby-operator">:</span> [<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>], <span class="ruby-identifier">queue</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;high&#39;</span>) <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">MyJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>)
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>See also Minitest::Rails::Expectations#assert_performed_with</p>
+
+
+
+
+ <div class="method-source-code" id="must_perform_with-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 693</span>
+ </pre>
+ </div>
+
+ </div>
+
+
+
+
+ </div>
+
+
<div id="method-i-must_redirect_to" class="method-detail ">
@@ -414,7 +642,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_redirect_to-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 86</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 88</span>
</pre>
</div>
@@ -483,7 +711,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_render_template-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 123</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 125</span>
</pre>
</div>
@@ -529,11 +757,11 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<pre class="ruby"><span class="ruby-comment"># expect that the response was a redirection</span>
<span class="ruby-identifier">must_respond_with</span> :<span class="ruby-identifier">redirect</span>
-<span class="ruby-identifier">response</span>.<span class="ruby-identifier">must_respond_with</span> :<span class="ruby-identifier">redirect</span>
+<span class="ruby-identifier">value</span>(<span class="ruby-identifier">response</span>).<span class="ruby-identifier">must_respond_with</span> :<span class="ruby-identifier">redirect</span>
<span class="ruby-comment"># expect that the response code was status code 401 (unauthorized)</span>
<span class="ruby-identifier">must_respond_with</span> <span class="ruby-value">401</span>
-<span class="ruby-identifier">response</span>.<span class="ruby-identifier">must_respond_with</span> <span class="ruby-value">401</span>
+<span class="ruby-identifier">value</span>(<span class="ruby-identifier">response</span>).<span class="ruby-identifier">must_respond_with</span> <span class="ruby-value">401</span>
</pre>
<p>See also <a
@@ -545,7 +773,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_respond_with-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 62</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 64</span>
</pre>
</div>
@@ -585,19 +813,19 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
to display upon failure.</p>
<pre class="ruby"><span class="ruby-comment"># Expect a basic route: a controller with the default action (index)</span>
-{ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;home&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;index&#39;</span> }.<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;/home&#39;</span>
+<span class="ruby-identifier">value</span>({ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;home&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;index&#39;</span> }).<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;/home&#39;</span>
<span class="ruby-comment"># Test a route generated with a specific controller, action, and parameter (id)</span>
-{ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;entries&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;show&#39;</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-value">23</span> }.<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;/entries/show/23&#39;</span>
+<span class="ruby-identifier">value</span>({ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;entries&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;show&#39;</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-value">23</span> }).<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;/entries/show/23&#39;</span>
<span class="ruby-comment"># Expect a basic route (controller + default action), with an error message if it fails</span>
-{ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;store&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;index&#39;</span> }.<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;/store&#39;</span>
+<span class="ruby-identifier">value</span>({ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;store&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;index&#39;</span> }).<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;/store&#39;</span>
<span class="ruby-comment"># Tests a route, providing a defaults hash</span>
-{<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;9&quot;</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;square&quot;</span>}.<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;controller/action/9&#39;</span>, {<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;controller&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;action&quot;</span>}, {}, {<span class="ruby-identifier">item</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;square&quot;</span>}
+<span class="ruby-identifier">value</span>({<span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;9&quot;</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;square&quot;</span>}).<span class="ruby-identifier">must_route_for</span> <span class="ruby-string">&#39;controller/action/9&#39;</span>, {<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;controller&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;action&quot;</span>}, {}, {<span class="ruby-identifier">item</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;square&quot;</span>}
<span class="ruby-comment"># Tests a route with a HTTP method</span>
-{ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;product&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;update&quot;</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;321&quot;</span> }.<span class="ruby-identifier">must_route_for</span>({ <span class="ruby-identifier">method</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;put&#39;</span>, <span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;/product/321&#39;</span> })
+<span class="ruby-identifier">value</span>({ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;product&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;update&quot;</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;321&quot;</span> }).<span class="ruby-identifier">must_route_for</span>({ <span class="ruby-identifier">method</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;put&#39;</span>, <span class="ruby-identifier">path</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;/product/321&#39;</span> })
</pre>
<p>See also <a
@@ -609,7 +837,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_route_for-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 219</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 221</span>
<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:assert_routing</span>, <span class="ruby-value">:must_route_for</span>
</pre>
</div>
@@ -648,16 +876,16 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<p>The <code>defaults</code> parameter is unused.</p>
<pre class="ruby"><span class="ruby-comment"># Expects that the default action is generated for a route with no action</span>
-{<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;items&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;index&quot;</span>}.<span class="ruby-identifier">must_route_from</span> <span class="ruby-string">&quot;/items&quot;</span>
+<span class="ruby-identifier">value</span>({<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;items&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;index&quot;</span>}).<span class="ruby-identifier">must_route_from</span> <span class="ruby-string">&quot;/items&quot;</span>
<span class="ruby-comment"># Tests that the list action is properly routed</span>
-{<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;items&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;list&quot;</span>}.<span class="ruby-identifier">must_route_to</span> <span class="ruby-string">&quot;/items/list&quot;</span>
+<span class="ruby-identifier">value</span>({<span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;items&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;list&quot;</span>}).<span class="ruby-identifier">must_route_to</span> <span class="ruby-string">&quot;/items/list&quot;</span>
<span class="ruby-comment"># Tests the generation of a route with a parameter</span>
-{ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;items&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;list&quot;</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;1&quot;</span> }.<span class="ruby-identifier">must_route_from</span> <span class="ruby-string">&quot;/items/list/1&quot;</span>
+<span class="ruby-identifier">value</span>({ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;items&quot;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;list&quot;</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;1&quot;</span> }).<span class="ruby-identifier">must_route_from</span> <span class="ruby-string">&quot;/items/list/1&quot;</span>
<span class="ruby-comment"># Expects that the generated route gives us our custom route</span>
-{ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;scm&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;show_diff&#39;</span>, <span class="ruby-identifier">revision</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;12&quot;</span> }.<span class="ruby-identifier">must_route_from</span> <span class="ruby-string">&quot;changesets/12&quot;</span>
+<span class="ruby-identifier">value</span>({ <span class="ruby-identifier">controller</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;scm&#39;</span>, <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">&#39;show_diff&#39;</span>, <span class="ruby-identifier">revision</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;12&quot;</span> }).<span class="ruby-identifier">must_route_from</span> <span class="ruby-string">&quot;changesets/12&quot;</span>
</pre>
<p>See also <a
@@ -669,7 +897,7 @@ <h1 id="module-Minitest::Rails::Expectations" class="module">
<div class="method-source-code" id="must_route_from-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 148</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 150</span>
<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:assert_generates</span>, <span class="ruby-value">:must_route_to</span>
</pre>
</div>
@@ -817,7 +1045,7 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<div class="method-source-code" id="must_select-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 316</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 318</span>
</pre>
</div>
@@ -872,7 +1100,7 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<div class="method-source-code" id="must_select_email-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 339</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 341</span>
</pre>
</div>
@@ -942,7 +1170,7 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<div class="method-source-code" id="must_select_encoded-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 379</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 381</span>
</pre>
</div>
@@ -970,7 +1198,7 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<p>Checks that the numeric result of evaluating an expression is not changed
before and after invoking.</p>
-<pre class="ruby"><span class="ruby-identifier">lambda</span> { <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span> }.<span class="ruby-identifier">wont_change</span> <span class="ruby-string">&quot;User.count&quot;</span>
+<pre class="ruby"><span class="ruby-identifier">value</span> { <span class="ruby-constant">User</span>.<span class="ruby-identifier">new</span> }.<span class="ruby-identifier">wont_change</span> <span class="ruby-string">&quot;User.count&quot;</span>
</pre>
<p>See also <a
@@ -980,8 +1208,8 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<div class="method-source-code" id="wont_change-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 30</span>
-<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:refute_difference</span>, <span class="ruby-value">:wont_change</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 32</span>
+<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:refute_difference</span>, <span class="ruby-value">:wont_change</span>, <span class="ruby-value">:block</span>
</pre>
</div>
@@ -1025,7 +1253,7 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<div class="method-source-code" id="wont_dom_equal-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 409</span>
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 411</span>
<span class="ruby-identifier">infect_an_assertion</span> <span class="ruby-value">:refute_dom_equal</span>, <span class="ruby-value">:wont_dom_equal</span>
</pre>
</div>
@@ -1038,12 +1266,12 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
</div>
- <div id="method-i-wont_have_tag" class="method-detail ">
+ <div id="method-i-wont_enqueue_jobs" class="method-detail ">
<div class="method-heading">
<span class="method-callseq">
- wont_have_tag(*opts)
+ wont_enqueue_jobs(number)
</span>
<span class="method-click-advice">click to toggle source</span>
@@ -1054,36 +1282,99 @@ <h3 id="method-i-must_select-label-Equality+Tests">Equality Tests<span><a href="
<div class="method-description">
- <p>Identical to <code>must_have_tag</code>, but asserts that a matching tag
-does <em>not</em> exist. (See <code>must_have_tag</code> for a full
-discussion of the syntax.)</p>
+ <p>Expects that no jobs have been enqueued.</p>
-<pre class="ruby"><span class="ruby-comment"># Expect that there is not a &quot;div&quot; containing a &quot;p&quot;</span>
-<span class="ruby-identifier">wont_have_tag</span> <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;div&quot;</span>, <span class="ruby-identifier">descendant</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;p&quot;</span> }
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">wont_enqueue_jobs</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;jeremy&#39;</span>)
+ <span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">1</span>
+<span class="ruby-keyword">end</span>
+</pre>
-<span class="ruby-comment"># Expect that an unordered list is empty</span>
-<span class="ruby-identifier">wont_have_tag</span> <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;ul&quot;</span>, <span class="ruby-identifier">descendant</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;li&quot;</span> }
+<p>If a block is passed, that block should not cause any job to be enqueued.</p>
-<span class="ruby-comment"># Expect that there is not a &quot;p&quot; tag with between 1 to 3 &quot;img&quot; tags</span>
-<span class="ruby-comment"># as immediate children</span>
-<span class="ruby-identifier">wont_have_tag</span> <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;p&quot;</span>,
- <span class="ruby-identifier">children</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">count</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">3</span>, <span class="ruby-identifier">only</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">tag</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;img&quot;</span> } }
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">wont_enqueue_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-comment"># No job should be enqueued from this block</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>Note: This expectation is simply a shortcut for:</p>
+
+<pre class="ruby"><span class="ruby-identifier">must_enqueue_jobs</span> <span class="ruby-value">0</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
</pre>
<p>See also <a
-href="../../ActionController/TestCase.html#method-i-refute_tag">ActionController::TestCase#refute_tag</a>
-See also ActionView::TestCase#refute_tag See also
-ActionDispatch::IntegrationTest#refute_tag See also <a
-href="../../ActionController/TestCase.html#method-i-assert_no_tag">ActionController::TestCase#assert_no_tag</a>
-See also ActionView::TestCase#assert_no_tag See also
-ActionDispatch::IntegrationTest#assert_no_tag</p>
+href="../../ActiveJob/TestCase.html#method-i-assert_no_enqueued_jobs">ActiveJob::TestCase#assert_no_enqueued_jobs</a></p>
+
+
+
+ <div class="method-source-code" id="wont_enqueue_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 597</span>
+ </pre>
+ </div>
+ </div>
+
+
+
+ </div>
+
+
+ <div id="method-i-wont_perform_jobs" class="method-detail ">
+
+
+ <div class="method-heading">
+ <span class="method-callseq">
+ wont_perform_jobs(number)
+ </span>
- <div class="method-source-code" id="wont_have_tag-source">
- <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 533</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+
+
+ <div class="method-description">
+
+ <p>Expects that no jobs have been performed.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs</span>
+ <span class="ruby-identifier">wont_perform_jobs</span>
+
+ <span class="ruby-identifier">perform_enqueued_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-constant">HelloJob</span>.<span class="ruby-identifier">perform_later</span>(<span class="ruby-string">&#39;matthew&#39;</span>)
+ <span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">1</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
</pre>
+
+<p>If a block is passed, that block should not cause any job to be performed.</p>
+
+<pre class="ruby"><span class="ruby-keyword">def</span> <span class="ruby-identifier">test_jobs_again</span>
+ <span class="ruby-identifier">wont_perform_jobs</span> <span class="ruby-keyword">do</span>
+ <span class="ruby-comment"># No job should be performed from this block</span>
+ <span class="ruby-keyword">end</span>
+<span class="ruby-keyword">end</span>
+</pre>
+
+<p>Note: This assertion is simply a shortcut for:</p>
+
+<pre class="ruby"><span class="ruby-identifier">must_perform_jobs</span> <span class="ruby-value">0</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
+</pre>
+
+<p>See also <a
+href="../../ActiveJob/TestCase.html#method-i-assert_no_performed_jobs">ActiveJob::TestCase#assert_no_performed_jobs</a></p>
+
+
+
+
+ <div class="method-source-code" id="wont_perform_jobs-source">
+ <pre><span class="ruby-comment"># File lib/minitest/rails/expectations.rb, line 664</span>
+ </pre>
</div>
</div>
View
122 Minitest/Rails/Expectations/ActiveJob.html
@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<meta charset="UTF-8">
+
+<title>module Minitest::Rails::Expectations::ActiveJob - minitest-rails-2.2.0 Documentation</title>
+
+<script type="text/javascript">
+ var rdoc_rel_prefix = "../../../";
+</script>
+
+<script src="../../../js/jquery.js"></script>
+<script src="../../../js/darkfish.js"></script>
+
+<link href="../../../css/fonts.css" rel="stylesheet">
+<link href="../../../css/rdoc.css" rel="stylesheet">
+
+