Commit c0564c54 authored by Stan Hu's avatar Stan Hu

Fix Spinach and Capybara dependencies

Closes #30347
parent 731d574d
require 'spinach/capybara'
require 'capybara/poltergeist' require 'capybara/poltergeist'
require 'capybara-screenshot/spinach' require 'capybara-screenshot/spinach'
...@@ -25,5 +24,8 @@ Capybara.ignore_hidden_elements = false ...@@ -25,5 +24,8 @@ Capybara.ignore_hidden_elements = false
Capybara::Screenshot.prune_strategy = :keep_last_run Capybara::Screenshot.prune_strategy = :keep_last_run
Spinach.hooks.before_run do Spinach.hooks.before_run do
require 'spinach/capybara'
require 'capybara/rails'
TestEnv.eager_load_driver_server TestEnv.eager_load_driver_server
end end
...@@ -172,7 +172,7 @@ module TestEnv ...@@ -172,7 +172,7 @@ module TestEnv
def eager_load_driver_server def eager_load_driver_server
return unless defined?(Capybara) return unless defined?(Capybara)
puts "Starting the Capybara driver' server..." puts "Starting the Capybara driver server..."
Capybara.current_session.visit '/' Capybara.current_session.visit '/'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment