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 http://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,