Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions 15-cassettes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repository to the public web, those files in the `.gitignore` file
won't be shared in the public version.

When using `vcr` you may want to include your cassettes in the
`.gitignore` file. You may wan to when your cassettes contain sensitive
`.gitignore` file. You may want to when your cassettes contain sensitive
data that you don't want to have on the internet & dont want to hide
with [filter_sensitive_data](#api-keys-security).

Expand Down Expand Up @@ -52,33 +52,19 @@ that make the same query under the hood.

To do so, you can use the same cassette name for multiple `vcr::use_cassette()`
calls.
`vcr::check_cassette_names()` will complain about duplicate cassette
names, preventing you from accidentally re-using cassettes, however.
To allow duplicates, you can provide a character vector of the cassette names
you want to re-use to the `allowed_duplicates` argument of
`vcr::check_cassette_names()`.
That way you can use the same cassette across multiple tests.

## deleting cassettes

Removing a cassette is as easy as deleting in your file finder,
or from the command line, or from within a text editor or RStudio.
or from the command line, or from within a text editor or an IDE (RStudio, Positron, etc).

If you delete a cassette, on the next test run the cassette will
be recorded again.

If you do want to re-record a test to a cassette, instead of
deleting the file you can toggle [record modes](#record-modes).

## cassette file types

For right now the only persistence option is yaml. So all files
have a `.yml` extension.

When other persister options are added, additional file types
may be found. The next persister type is likely to be JSON,
so if you use that option, you'd have `.json` files instead of
`.yml` files.


[gitignorefile]: https://guide.freecodecamp.org/git/gitignore/
Expand Down
Loading