title: Problem with routes in functional testing
body: <p>I'm making a simple test project to prepare myself for my test.
  I'm fairly new to nested resources, in my example I have a newsitem and each newsitem has comments.</p>
  
  <p>The routing looks like this:</p>
  
  <pre><code>resources :comments
  
  resources :newsitems do
      resources :comments
  end
  </code></pre>
  
  <p>I'm setting up the functional tests for comments at the moment and I ran into some problems.</p>
  
  <p>This will get the index of the comments of a newsitem. @newsitem is declared in the setup ofc.</p>
  
  <pre><code>test "should get index" do
      get :index,:newsitem_id =&gt; @newsitem
      assert_response :success
      assert_not_nil assigns(:newsitem)
  end
  </code></pre>
  
  <p>But the problem lays here, in the "should get new".</p>
  
  <pre><code> test "should get new" do
      get new_newsitem_comment_path(@newsitem)
      assert_response :success
   end
  </code></pre>
  
  <p>I'm getting the following error.</p>
  
  <pre><code>ActionController::RoutingError: No route matches {:controller=&gt;"comments", :action=&gt;"/newsitems/1/comments/new"}
  </code></pre>
  
  <p>But when I look into the routes table, I see this:</p>
  
  <pre><code>new_newsitem_comment GET    /newsitems/:newsitem_id/comments/new(.:format)      {:action=&gt;"new", :controller=&gt;"comments"}
  </code></pre>
  
  <p>Can't I use the name path or what I'm doing wrong here?</p>
  
  <p>Thanks in advance.</p>