Fixtures in ActionController::TestCase

Hi guys,

Need some help.

I am using Rails 2.0 and while writing functional test, I encountered
the following problem

class UserControllerTest < ActionController::TestCase
  fixtures :users
def do_something
   attempt_login(users(:valid_user)) # assuming valid_user is a
proper line in

def attempt_login(user)
   post :login, :user => { :login => user.login, :password =>
user.password }

Running the test:

  1) Error:
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.login
    test/functional/user_controller_test.rb:41:in `attempt_login'
    test/functional/user_controller_test.rb:32:in `do_something'
testing/default.rb:7:in `run'

* I tried putting fixtures :users within setup, still the same
problem. This works if I derive Test::Unit::TestCase instead of the
new rails 2.0 default class