Created
September 6, 2020 09:46
-
-
Save RichOrElse/7ab359b370df18591c37cb47bb3a3cc7 to your computer and use it in GitHub Desktop.
Webtest configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/capybara.rb | |
Capybara.register_driver :chrome do |app| | |
options = %w[window-size=1440x768] | |
chrome_options = Selenium::WebDriver::Chrome::Options.new(args: options) | |
Capybara::Selenium::Driver.new app, browser: :chrome, options: chrome_options | |
end | |
Capybara.javascript_driver = :chrome | |
Capybara.default_max_wait_time = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'vcr', '~> 6.0' | |
gem 'webmock', '~> 3.8', '>= 3.8.3' | |
gem 'webdrivers', '~> 4.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/rails_helper.rb | |
require 'webmock/rspec' | |
require "vcr" | |
VCR.configure do |c| | |
c.cassette_library_dir = "spec/vcr" | |
c.hook_into :webmock | |
c.define_cassette_placeholder("<STRIPE_API_KEY>") { Stripe.api_key } | |
c.allow_http_connections_when_no_cassette = true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment