Ruby Authlogic Webapp在selenium Javascript测试中不再工作

Ruby Authlogic Webapp在selenium Javascript测试中不再工作,ruby,selenium,rspec,capybara,authlogic,Ruby,Selenium,Rspec,Capybara,Authlogic,在测试RubyonRails应用程序时,我有工作测试(也是一个登录用户),但是只要我在测试后面加上“:js=>true”选项 it "does", :js => true do activate_authlogic visit '/' end a获取包含内部错误的网页 You must activate the Authlogic::Session::Base.controller with a controller object before creating ob

在测试RubyonRails应用程序时,我有工作测试(也是一个登录用户),但是只要我在测试后面加上“
:js=>true
”选项

it "does", :js => true do
    activate_authlogic 
    visit '/'
end
a获取包含内部错误的网页

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

我怎样才能让它工作?我怎样才能更准确地判断错误呢?

现在它对我有效,我想是因为这个肮脏的片段

    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
女巫来自这个问题