2009-04-08
■ [rails][rspec] restful-authenticationの作るspecがRails 2.3.2に対応していない
以下のようなエラーが出ると思う。
3)NoMethodError in 'UsersController named routing should route user_(:id => '1') to /users/1' undefined method `formatted_user_path' for #<Spec::Rails::Example::ControllerExampleGroup::Subclass_4::Subclass_3:0x22bcd8c>./spec/controllers/users_controller_spec.rb:152: 4)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", "controller"=>"users"}>, difference: <{"action"=>"update"}> ./spec/controllers/users_controller_spec.rb:83:
こんな感じで直した。
参考: