search for: test_login_success

Displaying 1 result from an estimated 1 matches for "test_login_success".

2009 Apr 06
9
setup method in functional tests and instance variables
...erControllerTest < ActionController::TestCase fixtures :users def setup @controller = UserController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @invalid_user = user(:invalid_user) @valid_user = users(:valid_user) end def test_login_success @valid_user.screen_name end When I run a test that tries to use the @valid_user variable I get the following error. 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 i...