I''m trying to get my tests for a version 1.2.6 Rails app upgraded to version 2.0.2. In my functionals, all my calls to post are now failing. Here''s one: post :login, :login => { :email => user.email, :password => ''wrong'' } The 2nd edition Agile Web Development with Rails book shows that exact syntax on page 203, and then the docs at api.rubyonrails.com don''t really lead me to believe the syntax has changed. So anyway, here''s the error I''m getting: ArgumentError: wrong number of arguments (1 for 2) /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/url_rewriter.rb:81:in `rewrite_url'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/url_rewriter.rb:81:in `rewrite'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/test_process.rb:445:in `build_request_uri'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/test_process.rb:392:in `process'' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/test_process.rb:364:in `post'' test/functional/login_controller_test.rb:78:in `test_bad_email_password'' Any idea? Thanks, -- Greg Donald destiney.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Try post ''login'', :login => { :email => user.email, :password => ''wrong'' } --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, Jul 3, 2008 at 10:37 PM, Ryan Bigg <radarlistener-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Try post ''login'', :login => { :email => user.email, :password => > ''wrong'' }That produces the same error. -- Greg Donald destiney.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 4, 4:46 am, "Greg Donald" <gdon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, Jul 3, 2008 at 10:37 PM, Ryan Bigg <radarliste...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Try post ''login'', :login => { :email => user.email, :password => > > ''wrong'' } > > That produces the same error. >Have you got a plugin that could be overriding something here. If you look at the rails source, in an untouched copy of rails 2.0.2, rewrite_url is only called with 1 argument, not 2 (and does indeed only accept 1 argument). However in rails 1.2.6 it did require 2 arguments, so my money is on a plugin haven overriden that method. Fred --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Jul 4, 2008 at 2:10 AM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Have you got a plugin that could be overriding something here. If you > look at the rails source, in an untouched copy of rails 2.0.2, > rewrite_url is only called with 1 argument, not 2 (and does indeed > only accept 1 argument). However in rails 1.2.6 it did require 2 > arguments, so my money is on a plugin haven overriden that method.Thanks so much Fred. This project uses the reverse_proxy_fix plugin and it simply needed to be upgraded for Rails 2.0. My functional tests are now passing. -- Greg Donald destiney.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---