forked from eliotsykes/rspec-rails-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcr.rb
27 lines (22 loc) · 754 Bytes
/
vcr.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Installing VCR:
# 0. Check spec/support dir is auto-required in spec/rails_helper.rb.
#
# 1. Add vcr and webmock gems to Gemfile:
#
# group :test do
# gem 'vcr'
# gem 'webmock'
# end
# 2. Create a file like this one you're reading in spec/support/vcr.rb
VCR.configure do |config|
config.cassette_library_dir = "spec/support/http_cache/vcr"
config.hook_into :webmock
# Only want VCR to intercept requests to external URLs.
config.ignore_localhost = true
end
# 3. Start using VCR. See example use in spec/jobs/headline_scraper_job_spec.rb.
# Cassettes will be stored as .yml files in cassette_library_dir specified above.
# Suggested docs
# --------------
# https://relishapp.com/vcr/vcr/docs
# http://www.rubydoc.info/gems/vcr/frames