None
The :none
record mode will:
Replay previously recorded interactions.
Cause an error to be raised for any new requests.
This is useful when your code makes potentially dangerous HTTP requests. The
:none
record mode guarantees that no new HTTP requests will be made.
Background ()
Given a file named "vcr_config.rb" with:
And a previously recorded cassette file "cassettes/example.yml" with:
Previously recorded responses are replayed
Given a file named "replay_recorded_response.rb" with:
When I run ruby replay_recorded_response.rb
Then it should pass with "Response: Hello".
New requests are prevented
Given a file named "prevent_new_request.rb" with:
When I run ruby prevent_new_request.rb
Then it should fail with "An HTTP request has been made that VCR does not know how to handle".
Last updated