Skip to content

Instantly share code, notes, and snippets.

@x4d3
Last active October 26, 2018 10:08
Show Gist options
  • Save x4d3/3a78ebf9cbc873a595217b1ac55da4c7 to your computer and use it in GitHub Desktop.
Save x4d3/3a78ebf9cbc873a595217b1ac55da4c7 to your computer and use it in GitHub Desktop.

collapsible markdown?

Coucou in `Test`
       ================================================================================
       An HTTP request has been made that VCR does not know how to handle:
         GET https://api.dpdgroup.co.uk/organisation/pickuplocation?countryCode=GB&filter=nearAddress&maxDistance=30&searchAddress=EC1Y%208AF&searchCriteria=&searchPage=1&searchPageSize=5
   VCR is currently using the following cassette:
     - /home/fm/spec/fixtures/vcr_cassettes/features/checkout/click_and_collect_within_uk_spec/uk_guest_ship_to_shop_checkout_using_new_address_for_recipient.yml
       - :record => :once
       - :match_requests_on => [:method, :uri, #<Method: MatchRequest.headers>, #<Method: MatchRequest.body>]

   Under the current configuration VCR can not find a suitable HTTP interaction
   to replay and is prevented from recording new requests. There are a few ways
   you can deal with this:

     * If you're surprised VCR is raising this error
       and want insight about how VCR attempted to handle the request,
       you can use the debug_logger configuration option to log more details [1].
     * You can use the :new_episodes record mode to allow VCR to
       record this new request to the existing cassette [2].
     * If you want VCR to ignore this request (and others like it), you can
       set an `ignore_request` callback [3].
     * The current record mode (:once) does not allow new requests to be recorded
       to a previously recorded cassette. You can delete the cassette file and re-run
       your tests to allow the cassette to be recorded with this request [4].
     * The cassette contains 4 HTTP interactions that have not been
       played back. If your request is non-deterministic, you may need to
       change your :match_requests_on cassette option to be more lenient
       or use a custom request matcher to allow it to match [5].

   [1] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/configuration/debug-logging
   [2] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/record-modes/new-episodes
   [3] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/configuration/ignore-request
   [4] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/record-modes/once
   [5] https://www.relishapp.com/vcr/vcr/v/4-0-0/docs/request-matching
   ================================================================================  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment