Sha256: 2963f0d8dcd15c70d87065a6703f0a91aadd5568f608451e6ccb237083edea4f
Contents?: true
Size: 867 Bytes
Versions: 10
Compression:
Stored size: 867 Bytes
Contents
module VCRSetup def self.configure_vcr # VCR is used to 'record' HTTP interactions with # third party services used in tests, and play em # back. Useful for efficiency, also useful for # testing code against API's that not everyone # has access to -- the responses can be cached # and re-used. require "vcr" require "webmock/rspec" # To allow us to do real HTTP requests in a VCR.turned_off, we # have to tell webmock to let us. # WebMock.allow_net_connect!(:net_http_connect_on_start => true) VCR.configure do |c| c.cassette_library_dir = "spec/fixtures/vcr_cassettes" c.hook_into :webmock c.allow_http_connections_when_no_cassette = true c.ignore_localhost = true # c.filter_sensitive_data("<MY_SECRET_KEY>") { Rails.application.credentials.dig(:maxmind_api_key) } end end end
Version data entries
10 entries across 10 versions & 1 rubygems