Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include request info when NotMatchError occurs #74

Merged
merged 1 commit into from Oct 23, 2016

Conversation

goodgravy
Copy link
Contributor

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:

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!

@coveralls
Copy link

coveralls commented Sep 8, 2016

Coverage Status

Coverage increased (+0.02%) to 93.427% when pulling 412aeae on goodgravy:master into aa8d09d on parroty:master.

@parroty parroty merged commit 4a631ed into parroty:master Oct 23, 2016
@parroty
Copy link
Owner

parroty commented Oct 23, 2016

Thanks! and sorry taking time to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants