Nothing
describe(".onLoad()", {
test_that(".onLoad creates directory when type is persistent", {
with_gutenberg_cache(type = "persistent", {
.onLoad(NULL, NULL)
cache_path <- gutenberg_cache_dir()
expect_true(dir.exists(cache_path))
})
})
test_that(".onLoad creates directory when type is session", {
with_gutenberg_cache(type = "session", {
.onLoad(NULL, NULL)
cache_path <- gutenberg_cache_dir()
expect_true(dir.exists(cache_path))
})
})
test_that("warns and defaults to session when cache type is invalid", {
with_gutenberg_cache(
{
options(gutenbergr_cache_type = "invalid_type")
expect_warning(
.onLoad(NULL, NULL),
"Invalid gutenbergr_cache_type.*Defaulting to"
)
expect_identical(
getOption("gutenbergr_cache_type"),
"session"
)
path <- gutenberg_cache_dir()
expect_true(
startsWith(
normalizePath(path, mustWork = FALSE),
normalizePath(tempdir(), mustWork = FALSE)
)
)
},
type = "session"
)
})
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.