Hi all,

I'm trying to test that my users show page renders. The resource has
the route /users/:id

How would I code that for an Rspec test? So far I've tried these four
ways:

it "should have a users show path" do
get user_path(:action => 'show')
end

it "should have a users show path" do
get user_show_path
end

it "should have a users show path" do
get user_path(:id => '1')
end

it "should have a users show path" do
get '/users/1'
end

But I keep getting a RoutingError from Rspec even though it renders ok
when I just go to the page. So how would I spec it? Thanks

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 5 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 6, '12 at 9:39a
activeFeb 7, '12 at 8:38p
posts5
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase