Whitelist Webdrivers update URLs in WebMock

Resolves #2557:

    $ docker-compose run --rm osem bundle exec rspec --tag js
    …
    WebMock::NetConnectNotAllowedError

See titusfortner/webdrivers#109 for details.
This commit is contained in:
Andrew Kvalheim 2020-03-16 19:03:56 -07:00 committed by Henne Vogelsang
parent d928be7e18
commit fa129d218f
No known key found for this signature in database
GPG key ID: 9D6164C2955FADE0

View file

@ -2,7 +2,10 @@
# Mock external requests to youtube
require 'webmock/rspec'
WebMock.disable_net_connect!(allow_localhost: true, allow: /stripe.com/)
driver_urls = Webdrivers::Common.subclasses.map do |driver|
Addressable::URI.parse(driver.base_url).host
end
WebMock.disable_net_connect!(allow_localhost: true, allow: [*driver_urls, /stripe.com/])
RSpec.configure do |config|
config.before(:each) do