Sha256: c3a19eceeeeefb6aa35b5f78cea0ca836a7156cfa92204640b3dacde8ca8b7f7

Contents?: true

Size: 428 Bytes

Versions: 3

Compression:

Stored size: 428 Bytes

Contents

require "capybara/rails"
require "capybara/rspec"

require "selenium-webdriver"

Capybara.register_driver :chrome do |app|
  args = ["disable-gpu"]
  headless = ActiveModel::Type::Boolean.new.cast(ENV.fetch("HEADLESS", true))
  args << "headless" if headless
  options = Selenium::WebDriver::Chrome::Options.new(args:)

  Capybara::Selenium::Driver.new(app, browser: :chrome, options:)
end

Capybara.javascript_driver = :chrome

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capy-spec-0.0.3 lib/capy_spec/capybara.rb
capy-spec-0.0.2 lib/capy_spec/capybara.rb
capy-spec-0.0.1 lib/capy_spec/capybara.rb