Hello, My comments are currently routed inside of my articles, so my routes file looks like the following: resources :articles do resources :comments end I am trying to write an Rspec test that tests whether or not guests (non-signed-in users) can comment on my articles with the following inside of my comments controller test: it "should deny access to ''create''" do post :create response.should redirect_to(signin_path) end I get an error when running the test: No route matches {:controller=>"comments", :action=>"create"} I think this is because it is trying to test a route on localhost/comments/create, but I need the test to take place within localhost/articles/id/comments/create Now, I have the following variable in the before(:each) part of my test file: @article = Factory(:article, :user => @user, :title => "Article Title", :content => "Article Content") I want to test if a guest can create a comment in @article, but I am unsure of how to do that. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.