include_http_adapter_for("<http_lib>")
require 'vcr'
VCR.configure do |c|
<configuration>
c.cassette_library_dir = 'cassettes'
end
VCR.use_cassette('example', :match_requests_on => [:uri]) do
puts "Response for /bar: " + response_body_for(:get, "http://example.com/bar")
end
VCR.use_cassette('example', :match_requests_on => [:uri]) do
puts "Response for /foo: " + response_body_for(:get, "http://example.com/foo")
end
When I run ruby uri_matching.rb
Then it should pass with:
Response for /bar: bar response
Response for /foo: foo response