# NOT RUN {
## Testing the environment driver is nice and fast:
if (requireNamespace("testthat")) {
create_env <- function(dr = NULL, ...) {
driver_environment(dr$envir, ...)
}
test_driver(create_env)
}
# To test things like the rds driver, I would run:
# }
# NOT RUN {
if (requireNamespace("testthat")) {
create_rds <- function(dr = NULL) {
driver_rds(if (is.null(dr)) tempfile() else dr$path)
}
test_driver(create_rds)
}
# }
Run the code above in your browser using DataLab