Rails 2.0.2 – test setup not being called
The setup method for ActionController::TestCase is useful in some circumstances, e.g. having a user login in your tests.
def setup
super
login_as :quentin
end
However, when you run the tests, all your tests with login_required fails.
Basically, this is a bug in Rails 2.0.2 where setup is not called. This was fixed in revision 8442 (one revision after rails 2.0.2 was released). See http://dev.rubyonrails.org/ticket/10568
So, we would want that revision by using:
rake rails:freeze:edge REVISION=8442
NOTE: rubyonrails.org is down/domain expired so rake might fail. In the meantime, try svn export or some other way to get revision 8442 from another repository.
UPDATE: rubyonrails.org is back up (domain renewed)!