Smoke Tests and VCR Options
Learn about smoke tests, VCR recording options, and VCR matchers.
Smoke tests
So far, we’ve used VCR to record an interaction once and preserve it for all time. VCR provides other options. These options are passed as key-value arguments to VCR.use_cassette(re_record_interval: 7.days)
or, if we’re using RSpec metadata, as the value part of the metadata, as in vcr: {re_record_interval: 7.days}
.
The re_record_interval
method
That re_record_interval
we just used as an example allows us to use the same VCR test as both an integration and a smoke test. The re_record_interval
is an amount of time. If the associated cassette requests are older than the interval, then VCR will attempt to reconnect to the HTTP server ...