This is the error I get when I run a cucumber test with @javascript with authlogic:
You must activate the Authlogic::Session::Base.controller with a controller object before creating objects
This is my authlogic support code in feature/support/authlogic.rb:
require "authlogic"
require "authlogic/test_case"
World(Authlogic::TestCase)
ApplicationController.skip_before_filter :activate_authlogic
Before do
activate_authlogic
end
This is how I created a session:
def create_session
Session.create(:name => "test", :password => "test-33")
end
Without @javascript, it will not give me the error about authlogic not being activated, but with @javascript it does. How do I fix this problem?