Nothing
context("prep_access")
test_that("prep_access fails when it can't find things", {
workdir <- tempdir()
oldworkdir <- getwd()
setwd(workdir)
on.exit({
setwd(oldworkdir)
})
expect_error(prep_access())
})
test_that("prep_access errors when no valid file paths are found", {
workdir <- tempdir()
oldworkdir <- getwd()
setwd(workdir)
on.exit({
setwd(oldworkdir)
})
create_spice()
expect_error(prep_access())
})
test_that("prep_access works correctly", {
workdir <- tempdir()
oldworkdir <- getwd()
setwd(workdir)
on.exit({
setwd(oldworkdir)
})
data_path <- file.path("data", "mydata.csv")
file.create(data_path)
writeLines(c("a,b,c", "1,2,3"), data_path)
create_spice()
prep_access()
expect_length(readLines("data/metadata/access.csv"), 2)
})
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.