Testing Rails routes

The other thing I can never remember off the top of my head:

1
2
3
4
5
6
7
8
9
>> r = ActionController::Routing::Routes
 
>> r.recognize_path '/perspective/edit_wizard/1', :method => :get
 
> {:action=>"edit_wizard", :id=>"1", :controller=>"perspective"}
 
>> r.generate :action=> "edit_wizard", :id=> "1", :controller=> "perspective"
 
> "/perspective/edit_wizard/1"

You must be logged in to post a comment.