Skip to content

Instantly share code, notes, and snippets.

@Hates
Created March 2, 2009 17:24
Show Gist options
  • Save Hates/72871 to your computer and use it in GitHub Desktop.
Save Hates/72871 to your computer and use it in GitHub Desktop.
Test:
route_for(:controller => 'users', :action => 'update', :id => '1', :method => :put).should == "/users/1"
Failure:
Test::Unit::AssertionFailedError in 'UsersController route generation should route users's 'update' action correctly'
The recognized options <{"action"=>"show", "id"=>"1", "controller"=>"users"}> did not match <{"action"=>"update", "id"=>"1", "method"=>:put, "controller"=>"users"}>, difference: <{"action"=>"update", "method"=>:put}>
Routes:
PUT /users/:id {:controller=>"users", :action=>"update"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment