diff --git a/features/support/capybara.rb b/features/support/capybara.rb index 456ec4deaf5..96e1421462f 100644 --- a/features/support/capybara.rb +++ b/features/support/capybara.rb @@ -25,5 +25,5 @@ Capybara.ignore_hidden_elements = false Capybara::Screenshot.prune_strategy = :keep_last_run Spinach.hooks.before_run do - TestEnv.warm_asset_cache unless ENV['CI'] || ENV['CI_SERVER'] + TestEnv.eager_load_driver_server end diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index cebc972be7e..d4e38eb2a51 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -27,6 +27,6 @@ Capybara::Screenshot.prune_strategy = :keep_last_run RSpec.configure do |config| config.before(:suite) do - TestEnv.warm_asset_cache unless ENV['CI'] || ENV['CI_SERVER'] + TestEnv.eager_load_driver_server end end diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index b63df38187c..6c48be904fc 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -169,7 +169,7 @@ module TestEnv # # Otherwise they'd be created by the first test, often timing out and # causing a transient test failure - def warm_asset_cache + def eager_load_driver_server return unless defined?(Capybara) Capybara.current_session.driver.visit '/'