tests/testthat/helper-rcoreoa.R

library("vcr")
vcr_dir <- "../fixtures"
if (!nzchar(Sys.getenv("CORE_KEY"))) {
  if (dir.exists(vcr_dir)) {
    Sys.setenv("CORE_KEY" = "foobar")
  } else {
    stop("No API key nor cassettes, tests cannot be run.",
         call. = FALSE)
  }
}
invisible(vcr::vcr_configure(
  dir = vcr_dir,
  filter_sensitive_data = list("<<core_key>>" = Sys.getenv('CORE_KEY'))
))
vcr::check_cassette_names()

Try the rcoreoa package in your browser

Any scripts or data that you put into this service are public.

rcoreoa documentation built on July 8, 2020, 7:30 p.m.