Error for HTTP request made when no cassette is in use
- `VCR.turn_off!` => turn VCR off so HTTP requests are allowed.
Cassette insertions will trigger an error.
- `VCR.turn_off!(:ignore_cassettes => true)` => turn
VCR off and ignore cassette insertions (so that no error is raised).
- `VCR.turn_on!` => turn VCR back on
- `VCR.turned_off { ... }` => turn VCR off for the duration of the
provided block.Error for request when no cassette is in use
include_http_adapter_for("<http_lib>")
require 'vcr'
VCR.configure do |c|
<configuration>
c.cassette_library_dir = 'cassettes'
end
response_body_for(:get, 'http://example.com/')Examples
configuration
http_lib
Temporarily turn VCR off to allow HTTP requests to proceed as normal
Turning VCR off prevents cassettes from being inserted
Turning VCR off with :ignore_cassettes => true ignores cassettes
:ignore_cassettes => true ignores cassettesLast updated