cassettes {vcr} | R Documentation |
List cassettes, get current cassette, etc.
Description
List cassettes, get current cassette, etc.
Usage
cassettes()
current_cassette()
current_cassette_recording()
current_cassette_replaying()
cassette_path()
Details
-
cassettes()
: returns all active cassettes in the current session. -
current_cassette()
: returnsNULL
when no cassettes are in use; returns the current cassette (aCassette
object) when one is in use -
currrent_cassette_recording()
andcurrent_cassette_replaying()
: tell you if the current cassette is recording and/or replaying. They both returnFALSE
if there is no cassette in use. -
cassette_path()
: returns the current directory path where cassettes will be stored
Examples
vcr_configure(dir = tempdir())
# list all cassettes
cassettes()
# list the currently active cassette
insert_cassette("stuffthings")
current_cassette()
cassettes()
eject_cassette()
cassettes()
# list the path to cassettes
cassette_path()
vcr_configure(dir = file.path(tempdir(), "foo"))
cassette_path()
vcr_configure_reset()
[Package vcr version 2.0.0 Index]