We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38a5550 commit e369df1Copy full SHA for e369df1
spec/support/webmock_vcr.rb
@@ -0,0 +1,29 @@
1
+require "webmock/rspec"
2
+require "vcr"
3
+
4
+VCR.configure do |config|
5
+ config.cassette_library_dir = "spec/cassettes"
6
+ config.hook_into :webmock
7
+ config.ignore_localhost = true
8
+ config.configure_rspec_metadata!
9
+end
10
11
+RSpec.configure do |config|
12
+ config.before(:each) do
13
+ WebMock.disable_net_connect!(
14
+ allow_localhost: true,
15
+ allow: [
16
+ "chromedriver.storage.googleapis.com",
17
+ "validator.w3.org"
18
+ ]
19
+ )
20
+ end
21
22
+ config.around do |example|
23
+ if example.metadata.key?(:vcr)
24
+ example.run
25
+ else
26
+ VCR.turned_off { example.run }
27
28
29
0 commit comments