My VCR configure block is:
VCR.configure do |c|
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
c.hook_into :webmock
c.around_http_request(lambda { |req| req.uri =~ /google.com/ }) do |request|
VCR.use_cassette(request.uri, :decode_compressed_response => true, &request)
end
end
My tests work fine for post/get/put
methods but when I try to DELETE
, there is a clash in VCR because it matches with a previous PUT request. This is because the URI for that request is the same as the one needed for the DELETE request.
How do I change my use_cassette
method so that it uses a combination of URI + method? (or any other suggestion also welcome!)
Thanks!