-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
route_to
delegates to assert_routing
, which only passes if assert_generates
and assert_recognizes
would both pass. The Rails-3 router lets us define routes that are recognizable, but not generated. The simplest example is:
root :to => "projects#index"
In this case, this passes:
assert_recognizes({:controller => "projects", :action => "index"}, {:method => "get", :path => "/"})
But this fails:
assert_generates("/",{:controller => "projects", :action => "index"})
Therefore, these both fail:
assert_routing("/",{:controller => "projects", :action => "index"})
(:get => "/").should route_to({:controller => "projects", :action => "index"})
See http://groups.google.com/group/rspec/browse_thread/thread/50b46ca3e4bd3a78/2a60d77662a1ec31 for a lengthy discussion on this topic.
Metadata
Metadata
Assignees
Labels
No labels