This post originated from an RSS feed registered with Ruby Buzz
by Matthew Bass.
Original Post: rspec’s route_for breaks when upgrading Rails
Feed Title: Pelargir
Feed URL: http://feeds.feedburner.com/pelargir/
Feed Description: Musings on software and life from Matthew Bass. Regular posts on new web products, tips and tricks, etc.
Came across this interesting test failure after upgrading a project to Rails 2.2.2 earlier today:
should route users's 'destroy' action correctly
The recognized options <{"action"=>"show", "id"=>"1",
"controller"=>"users"}> did not match <{"action"=>"destroy", "id"=>"1",
"controller"=>"users"}>, difference: <{"action"=>"destroy"}>
Turns out that rspec’s route_for method behaves differently when run against Rails 2.2+ due to the routing changes. The controller in question is setup as [...]