0

Testing a Ruby on Rails application, I have working tests (also asa logged in user), however as soon as I put the ":js=>true" option behind a test

it "does", :js => true do
    activate_authlogic 
    visit '/'
end

a get the web page with an internal error back

 You must activate the Authlogic::Session::Base.controller with a controller object before creating objects

How can I get this to work? How can I determine the error more closely?

Yo Ludke
  • 2,149
  • 2
  • 23
  • 38

1 Answers1

0

By now it works for me, I think because of this dirty snippet

    module Authlogic
        module Session
          module Activation
            module ClassMethods
              def controller
                if !Thread.current[:authlogic_controller]
                  Thread.current[:authlogic_controller] = Authlogic::TestCase::MockController.new
                end
              Thread.current[:authlogic_controller]
            end
          end
        end
      end
     end

witch comes from the question SO: authlogic-with-capybara-cucumber-selenium-driver-not-working

Community
  • 1
  • 1
Yo Ludke
  • 2,149
  • 2
  • 23
  • 38