blog.sowatchasayin

Rails etc.

最新のRailsでrestful_authenticationを使う苦労に苛まれる初秋の一日でした。

2.3.4でrestful_authenticationのspecが通らない。この子たちのせいだった。

Rspecが新しいとダメな所がありました。下記のパッチみたいに直せばOKでした(update for rspec > 1.1.12らしい)。
http://github.com/dchelimsky/restful-authentication/commit/ad92c6cb52500c37ef81e30ac4e79adffc2f4d39

formatted_* routesが無くなった。これで通るっす。
- formatted_user_path(:id => '1', :format => 'xml').should == "/users/1.xml"
- formatted_user_path(:id => '1', :format => 'json').should == "/users/1.json"
+ user_path(:id => '1', :format => 'xml').should == "/users/1.xml"
+ user_path(:id => '1', :format => 'json').should == "/users/1.json"

いきさつ
What's New in Edge Rails: No More Formatted Routes
Add optional :format argument to named routes

No comments:

Post a Comment

Author

Fujimura Daisuke
http://fujimuradaisuke.com

Labels