Allow HTTP Connections When No Cassette
Last updated
Was this helpful?
Last updated
Was this helpful?
Usually, HTTP requests made when no cassette is inserted will . You can set the allow_http_connections_when_no_cassette
configuration option to true to allow requests, if you do not want to use VCR for everything.
Given a file named "vcr_setup.rb" with:
And the directory "vcr/cassettes" does not exist.
Given a file named "no_cassette.rb" with:
When I run ruby no_cassette.rb --with-server
Then the output should contain "Response: Hello".
Given a file named "record_replay_cassette.rb" with:
When I run ruby record_replay_cassette.rb --with-server
Then the output should contain "Response: Hello"
And the file "cassettes/localhost.yml" should contain "Hello"
When I run ruby record_replay_cassette.rb
Then the output should contain "Response: Hello".