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

ExVCR is trying to match request even though i'm not using use_cassete #136

Open
sescobb27 opened this issue Apr 20, 2018 · 8 comments
Open

Comments

@sescobb27
Copy link

Hi there, i'm trying to do some integration testing hitting a real 3rd party service (Stripe) and not a cassette, so i'm not using use_cassette or anything like that but still getting a RequestNotMatchError with a "previous" cassette (oembed-youtube). is there a way to disable ExVCR or to let it know i'm not asking to record a new cassette? (it works if i just run mix test PATH/TO/TEST.exs) but not when running mix test

** (ExVCR.RequestNotMatchError) Request did not match with any one in the current cassette: test/fixtures/vcr_cassettes/oembed-youtube.json.
     Delete the current cassette with [mix vcr.delete] and re-record.
@dwhelan
Copy link

dwhelan commented May 9, 2018

I ran into a similar problem and found that if I configured ExVCR to "clear mocks" then the mocking behaviour would be cleared between tests.

use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney, clear_mock: true

@sescobb27
Copy link
Author

@dwhelan oh, thanks, i will try that.

@sescobb27
Copy link
Author

sescobb27 commented May 9, 2018

unfortunately, that didn't work 😞 i'm still getting (ExVCR.RequestNotMatchError) from previous cassette

** (ExVCR.RequestNotMatchError) Request did not match with any one in the current cassette: test/fixtures/vcr_cassettes/oembed-youtube.json.
     Delete the current cassette with [mix vcr.delete] and re-record.

@SkipMike
Copy link

SkipMike commented Oct 8, 2018

This didn't work for me either. For reference, I've got an umbrella application, but all my errors seem to be happening within the same umbrella application.

@SkipMike
Copy link

SkipMike commented Oct 8, 2018

I'm also using exvcr 0.10.0.

@SkipMike
Copy link

SkipMike commented Oct 8, 2018

I've updated to 0.10.3 and still seeing the same problems.

@a-kinder
Copy link

a-kinder commented Nov 21, 2018

I'm experiencing the same issue after adding SendGrid to tests that do not use ExVCR. When running a single test file by itself the problem does not occur. Adding clear_mock did not work.

@a-kinder
Copy link

For posterity: syntax should be options: [clear_mock: true]. This worked for me

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

No branches or pull requests

4 participants