Skip to content

Instantly share code, notes, and snippets.

@noelrappin
Created October 18, 2017 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noelrappin/d6ffd93cd4f0c9ae1717ce2f5b9a35c4 to your computer and use it in GitHub Desktop.
Save noelrappin/d6ffd93cd4f0c9ae1717ce2f5b9a35c4 to your computer and use it in GitHub Desktop.
RSpec.configure do |config|
config.before(:each, type: :system) do
driven_by :rack_test
end
config.before(:each, type: :system, js: true) do
if ENV["SELENIUM_DRIVER_URL"].present?
driven_by :selenium, using: :chrome,
options: {
browser: :remote,
url: ENV.fetch("SELENIUM_DRIVER_URL"),
desired_capabilities: :chrome}
else
driven_by :selenium_chrome_headless
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment