This would be the same functionality as Webmock. Except it would take a cassette instead of a string.
Something like expect(Webmock)to receive...
This would be the same functionality as Webmock. Except it would take a cassette instead of a string.
Something like expect(Webmock)to receive...
Copyright © 2021 Jogjafile Inc.
There is a config for this:
match_requests_on.Defaults to
[:method, :uri]There is one more use case. Even if you match method, uri, body and headers, the spec will still pass even if the app does not make the expected requests.
To handle this, I write the url, headers and body as JSON to a file.
Then, in the spec use Webmock to validate it:
Reference: https://nicolasiensen.gitbook.io/vcr/configuration/default_cassette_options#match_requests_on-defaults-to-method-uri-when-it-has-not-been-set
https://nicolasiensen.gitbook.io/vcr/request-matching/body