Hey all I just installed restful_authentication in a new project and have run it''s specs. I''m getting a few failures. Just looking at the first, i can''t understand why it''s failing - can anyone see? #failing line from test route_for(:controller => ''users'', :action => ''update'', :id => ''1'').should == "/users/1" #reported reason for failure The recognized options <{"action"=>"show", "id"=>"1", "controller"=>"users"}> did not match <{"action"=>"update", "id"=>"1", "controller"=>"users"}>, difference: <{"action"=>"update"}> If you''re expecting this failure, we suggest {:get=>"/users/1"}.should_not be_routable So, it looks like "/users/1" with a put isn''t pointing to update. But, when i do rake routes i see user GET /users/:id(.:format) {:controller=>"users", :action=>"show"} PUT /users/:id(.:format) {:controller=>"users", :action=>"update"} DELETE /users/:id(.:format) {:controller=>"users", :action=>"destroy"} It looks like the route should work. And, in the console i can do this:>> include Spec::Rails::Example::RoutingHelpers=> Object>> params_from(:put, ''/users/1'')=> {:action=>"update", :controller=>"users", :id=>"1"} So, i don;t understand why the test is failing. Any ideas? thanks - max -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Jan-27 17:01 UTC
Re: restful_authentication - some default tests failing
Max Williams wrote:> Hey all > > I just installed restful_authentication in a new projectDo yourself a favor and take it right back out again. Restful_auth is based on unmaintainable, untestable generated crap code; it has no place in today''s Rails ecosystem. Use Authlogic instead, which is actually designed properly. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Max Williams
2010-Jan-27 17:11 UTC
Re: restful_authentication - some default tests failing
Thanks Marnen, AuthLogic does look good actually. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.