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

Make VCRMode::Record overwrite existing files #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

niclas-ahden
Copy link
Contributor

@niclas-ahden niclas-ahden commented Mar 12, 2024

Making this change to align with the documentation:

/// Record requests to the local VCR cassette files. Existing files will be overwritten

... and my expectation as a user coming from Ruby's VCR.

Thanks again for rvcr, it's great!

Making this changes to align with the documentation:

/// Record requests to the local VCR cassette files. Existing files will be overwritten

... and my expectation as a user coming from Ruby's VCR.
The previous commit cleared interactions every time a new interaction
was recorded. That meant that only a single interaction could ever be
saved.

Here we clear interactions once when the mode is set. This'll happen
after interactions have been loaded, since `VCRMiddleware` is
instantiated using `TryFrom<PathBuf>` which loads the old interactions.
@niclas-ahden
Copy link
Contributor Author

Ready for review 👌

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

1 participant