To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!More about adding a collaborator
Error for HTTP request made when no cassette is in use
VCR is designed to help you remove all HTTP dependencies from your
test suite. To assist with this, VCR will cause an exception to be
raised when an HTTP request is made while there is no cassette in
use. The error is helpful to pinpoint where HTTP requests are
made so you can use a VCR cassette at that point in your code.
- Error for request when no cassette is in use
a file named "no_cassette_error.rb" with:
require 'vcr_cucumber_helpers' include_http_adapter_for("http_lib") require 'vcr' VCR.config do |c| c.stub_with stub_with c.cassette_library_dir = 'cassettes' end response_body_for(:get, 'http://example.com/')
- I run "ruby no_cassette_error.rb"
- it should fail with "error"
the output should contain each of the following:
You can use VCR to automatically record this request and replay it later. no_cassette_error.rb:11 Examples: stub_with http_lib error :fakeweb net/http Real HTTP connections are disabled :webmock net/http Real HTTP connections are disabled :webmock httpclient Real HTTP connections are disabled :webmock curb Real HTTP connections are disabled :webmock patron Real HTTP connections are disabled :webmock em-http-request Real HTTP connections are disabled :typhoeus typhoeus Real HTTP requests are not allowed
Last published over 6 years ago by myronmarston.