features/support/env.rb in activeadmin-rb-1.5.2 vs features/support/env.rb in activeadmin-rb-1.6.0

- old
+ new

@@ -45,18 +45,18 @@ ensure RSpec::Mocks.teardown end end -require 'capybara/rails' -require 'capybara/cucumber' -require 'capybara/session' -require 'capybara/poltergeist' -require 'phantomjs/poltergeist' +require "capybara/cuprite" -Capybara.javascript_driver = :poltergeist +Capybara.register_driver(:cuprite) do |app| + Capybara::Cuprite::Driver.new(app, process_timeout: 30, timeout: 30) +end +Capybara.javascript_driver = :cuprite + Capybara.server = :webrick Capybara.asset_host = 'http://localhost:3000' # Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In @@ -93,10 +93,10 @@ end Before do # We are caching classes, but need to manually clear references to # the controllers. If they aren't clear, the router stores references - ActiveSupport::Dependencies.clear + ActiveSupport::Dependencies.clear if Rails::VERSION::MAJOR < 7 # Reload Active Admin ActiveAdmin.unload! ActiveAdmin.load! end