functional testing post syntax

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 =>, :password => 'wrong' }

The 2nd edition Agile Web Development with Rails book shows that exact
syntax on page 203, and then the docs at
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)
    test/functional/login_controller_test.rb:78:in `test_bad_email_password'

Any idea?


Try post 'login', :login => { :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.


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.