test_that("use", {
# Should create 'results/'marg_liks.csv'
filename <- create_n_mb_species_file(
project_folder_name = raztr::get_raztr_path("razzo_project")
)
# File should be created
expect_true(file.exists(filename))
# OK: filename is '[something]/razzo_project/results/n_mb_species.csv'
expect_true(
length(
grep(
pattern = "razzo_project.results.n_mb_species\\.csv$",
filename, perl = TRUE, value = TRUE
)
) > 0
)
# Clean up
file.remove(filename)
})
test_that("abuse", {
expect_error(
create_n_mb_species_file(project_folder_name = "nonsense"),
"'project_folder_name' must end with 'razzo_project'"
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.