spec/spec_helper.rb in solidus_culqi-0.1.0 vs spec/spec_helper.rb in solidus_culqi-0.1.1
- old
+ new
@@ -21,16 +21,23 @@
require 'database_cleaner'
require 'ffaker'
require 'vcr'
require 'webmock'
require 'capybara/rspec'
-require 'capybara/poltergeist'
+require 'selenium-webdriver'
require 'pry'
-Capybara.register_driver(:poltergeist) do |app|
- Capybara::Poltergeist::Driver.new app, timeout: 90
+Capybara.register_driver :geckodriver do |app|
+ ::Selenium::WebDriver::Firefox.driver_path = ENV['DRIVER_PATH']
+ options = ::Selenium::WebDriver::Firefox::Options.new
+ options.args << '--headless'
+
+ Capybara::Selenium::Driver.new(app,
+ browser: :firefox,
+ options: options)
end
-Capybara.javascript_driver = :poltergeist
+
+Capybara.javascript_driver = :geckodriver
Capybara.default_max_wait_time = 30
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }