[rspec-users] spec'ing namespaced routes
Frank Mattia
lists at ruby-forum.com
Sun Jul 4 20:15:03 EDT 2010
What's the appropriate way to test namespaced routes with rspec-2 &
rails 3?
I imagined that the following would work but it does not.
describe Admin::UsersController do
describe "routing" do
it "recognizes and generates #index" do
{ :get => "/admin/users" }.should route_to(:controller =>
"admin_users", :action => "index")
end
end
end
In fact,
{ :get => "/admin/users" }.should be_routable
fails as well. Yet rake routes disagrees.
Any suggestions?
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list