title: In Rspec, how test a controller action that does not have a route?
body: <p>In a few of my controllers I have an action that does not have a corresponding route because it is accessed only via a <code>render ... and return</code> in other controller actions.</p>
  
  <p>For example, I have an action</p>
  
  <pre><code>def no_such_page
   # displays a generic error screen
  end
  </code></pre>
  
  <p>In my RSpec controller test, how do I 'get' that method and look at the response body?</p>
  
  <p>If I try:</p>
  
  <pre><code>  get :no_such_page
    response.status.should be(200)
  </code></pre>
  
  <p>it of course gives the error </p>
  
  <pre><code>No route matches {:controller=&gt;"foo", :action=&gt;"{:action=&gt;:no_such_page}"}
  </code></pre>