One functional test spoils another


#1

In my functional test suite, I have two tests. Each is meant to test the
redirection that “verify :method => :post” will do when I trigger the
respective actions with a GET instead of a POST.

In both tests, I have a follow_redirect.

If both tests are present (or more precisely, if the follow_redirect is
present in the alphabetically-earlier one), the second test will fail at
the assert_redirected_to. The redirected URL is a loopback to the
action’s URL. That redirection might have come from ssl_required, though
the original request includes HTTPS.

So anyway, if I do a follow_redirect after a get in a functional test,
redirections following gets’es in later tests are screwed up.

Is this known?

Is there anything I can do about it?

— F

ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
Rails 1.2.6