I have the following in my functional test file.
class UserControllerTest < ActionController::TestCase
@controller = UserController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@invalid_user = user(:invalid_user)
@valid_user = users(:valid_user)
When I run a test that tries to use the @valid_user variable I get the
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.screen_name
It seems that this class isn't storing the instance variables in memory.
Thanks in advance