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:
parent
d928be7e18
commit
fa129d218f
1 changed files with 4 additions and 1 deletions
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
# Mock external requests to youtube
|
# Mock external requests to youtube
|
||||||
require 'webmock/rspec'
|
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|
|
RSpec.configure do |config|
|
||||||
config.before(:each) do
|
config.before(:each) do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue