Matching on Host
Use the :host
request matcher to match requests on the request host.
You can use this (alone, or in combination with :path
) as an alternative to :uri
so that non-deterministic portions of the URI are not considered as part of the request matching.
Background ()
Given a previously recorded cassette file "cassettes/example.yml" with:
Replay interaction that matches the host
And a file named "host_matching.rb" with:
When I run ruby host_matching.rb
Then it should pass with:
Examples
Last updated