title: Why doesn't get '/foo' work in functional test in Rails 3?
body: <p>Looking at the Rails Guides <a href="http://guides.rubyonrails.org/testing.html#integration-testing-examples" rel="nofollow noreferrer">http://guides.rubyonrails.org/testing.html#integration-testing-examples</a> and this SO question <a href="https://stackoverflow.com/questions/1656285/rails-functional-test-of-arbitrary-or-custom-urls">Rails Functional Test of Arbitrary or Custom URLs</a>, the following should work in a test:</p>
  
  <pre><code>require 'test_helper'
  class ApplicationControllerTest &lt; ActionController::TestCase
    test "test authentication" do
      get "/dash"
      assert_response :success
    end
  end
  </code></pre>
  
  <p>But I get an error: <code>ActionController::RoutingError: No route matches {:controller=&gt;"application", :action=&gt;"/dash"}</code></p>
  
  <p>My route is set up and works at the following URL: <a href="http://localhost:3000/dash" rel="nofollow noreferrer">http://localhost:3000/dash</a></p>
  
  <p>This is the route: </p>
  
  <pre><code>dash     /dash(.:format)   {:action=&gt;"population", :controller=&gt;"dashboard"}
  </code></pre>
  
  <p>Why wouldn't a <code>get</code> with a URL work? </p>
  
  <p>I am running this test from <code>class ApplicationControllerTest &lt; ActionController::TestCase</code>, which is different from dashboard controller. Do you have to run it from the functional test of the same name as the controller?</p>
  
  <p>Working in Rails 3.07 using Test::Unit.</p>