I keep getting this error every time I try running my test just by ranning “rake”:
/var/lib/gems/1.8/gems/authlogic-2.1.6/lib/authlogic/test_case/rails_request_adapter.rb:5:
uninitialized constant Authlogic::TestCase::ControllerAdapters
(NameError)
I have in the top of test_helper.rb these lines:
require “authlogic/test_case”
include Authlogic::TestCase
as suggested here.
I use Rails 3.0.6 and I have the gem authlogic in the Gemfile as expected:
gem “authlogic”
What am I missing? Why I cannot run the tests?
so I finally solve the problem. The thing is that your test_helper.rb needs to have the require “authlogic/test_case” as said before. However, for some reason I don’t fully understand, I also need to have a require “authlogic” before that one.
The I faced another problem because I had a fixture for user_sessions that was automatically generated. The solution was just deleting the fixture since authlogic doesnt create a table in the db for sessions. read more about this problem here