I've got a small problem with my funcional tests. I want to test the
function, that anybody who wants to the admin - controller redirect to
the authentication - controller. So I write this small test:
But every time I get these error message:
Loaded suite test/functional/admin_controller_test
Finished in 0.313 seconds.
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.
2 tests, 0 assertions, 0 failures, 1 errors
Has anybody an idea to solve this problem?