title: assert_redirected_to usage?
body: <p>Just starting out in using <code>Test::Unit</code> but having a problem nailing down a redirect test:</p>
  
  <pre><code>  test "should destroy line_item" do
      assert_difference('LineItem.count', -1) do
        delete :destroy, id: @line_item
      end
  
      assert_redirected_to controller: 'carts', action: 'show'
    end
  </code></pre>
  
  <p>which throws the following error:</p>
  
  <pre><code>Failure: Expected response to be a redirect to &lt;http://test.host/carts/980190962&gt; but was a redirect to &lt;http://test.host/carts/980190963&gt;.
  test_should_destroy_line_item(LineItemsControllerTest)
  test/functional/line_items_controller_test.rb:47:in `block in &lt;class:LineItemsControllerTest&gt;'
  </code></pre>
  
  <p>The <a href="http://apidock.com/rails/ActionDispatch/Assertions/ResponseAssertions/assert_redirected_to" rel="nofollow">docs</a> state the following:</p>
  
  <p><strong>assert_redirected_to(options = {}, message=nil) public</strong></p>
  
  <p>Assert that the redirection options passed in match those of the redirect called in the latest action. This match can be partial, such that assert_redirected_to(:controller => "weblog") will also match the redirection of redirect_to(:controller => "weblog", :action => "show") and so on.</p>
  
  <p>but <code>assert_redirected_to controller: 'carts'</code> leads to an even more outright failure:</p>
  
  <pre><code>Failure: Expected response to be a redirect to &lt;http://test.host/carts&gt; but was a redirect to &lt;http://test.host/carts/980190963&gt;.
  test_should_destroy_line_item(LineItemsControllerTest)
  </code></pre>
  
  <p>If the documentation is correct, what am I missing? If it is not, what alternatives do I have to test the redirect regardless of a matching id?</p>