How nice would it be to have something like
#' @exampleVcr cassette-name
#' <code>
instead of
#' @examples
#' \dontshow{insert_example_cassette("cassette-name", package = "package-name")}
#' <code>
#' \dontshow{eject_example_cassette()}
Now, the only usage of insert_example_cassette() I could find is in ellmer where there is a bit more setup/cleaning anyway: https://github.com/tidyverse/ellmer/blob/4223c73094a7fb4027f811283fa30c73182c921b/R/utils.R#L263 @hadley
Besides, insert_example_cassette() has other arguments. Maybe the syntax of the examples could somehow be closer to the syntax of vignette chunks, so that the arguments could be passed as knitr options?
In any case, the syntax for vcr usage in examples feels very clunky compared to the smoothness of using vcr in tests and vignettes. 😇
How nice would it be to have something like
instead of
Now, the only usage of
insert_example_cassette()I could find is in ellmer where there is a bit more setup/cleaning anyway: https://github.com/tidyverse/ellmer/blob/4223c73094a7fb4027f811283fa30c73182c921b/R/utils.R#L263 @hadleyBesides,
insert_example_cassette()has other arguments. Maybe the syntax of the examples could somehow be closer to the syntax of vignette chunks, so that the arguments could be passed as knitr options?In any case, the syntax for vcr usage in examples feels very clunky compared to the smoothness of using vcr in tests and vignettes. 😇