When investigating RequestNotMatchError exceptions, it can be hard to see where the problem is. The best approach seems to be to move your cassettes to one side, re-run the test, then diff the new and old cassettes to see where the change it.
This is a pretty slow and laborious developer experience.
Solution
Include some basic information about the request which didn't match anything in the active cassette, to help the developer zero in on where the problem is.
Example message:
Request did not match with any one in the current cassette: fixture/vcr_cassettes/example_ibrowse_different.json.
Delete the current cassette with [mix vcr.delete] and re-record.
Request: ['http://example.com/different_from_original', [], :get]
If there's a better way to format the request in a human-friendly way, let me know!
Coverage increased (+0.02%) to 93.427% when pulling 412aeae9ce7f83f2da9fb35c0fbaab655e40926b on goodgravy:master into aa8d09d8c472d7d0c0d0a89fce7c625d9a237b3d on parroty:master.
Problem
When investigating
RequestNotMatchError
exceptions, it can be hard to see where the problem is. The best approach seems to be to move your cassettes to one side, re-run the test, then diff the new and old cassettes to see where the change it.This is a pretty slow and laborious developer experience.
Solution
Include some basic information about the request which didn't match anything in the active cassette, to help the developer zero in on where the problem is.
Example message:
If there's a better way to format the request in a human-friendly way, let me know!