Gemfile
group :test do
gem 'vcr'
gem 'webmock'
end
spec_helper.rb
VCR.configure do |vcr|
vcr.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
vcr.hook_into :webmock
vcr.configure_rspec_metadata!
# vcr.default_cassette_options = {
# match_requests_on: [:host, :method, :path],
# }
end
Spec:
RSpec.describe "Readings", :vcr, type: :system do
# ...
end