test_that("read_timber: Read .CSV works", {
write_tibble_to_csv <- function(timber, mill_step) {
path <- mill_step
readr::write_csv(timber, path)
return(path)
}
name <- "read_timber"
test_file <- paste0(
"test-",
name,
".csv"
)
expect_snapshot_csv <- function(code, name) {
name <- paste0(name, ".csv")
announce_snapshot_file(name = name)
path <- write_tibble_to_csv(code, name)
expect_snapshot_file(path, name)
}
expect_snapshot_csv(suppressMessages(read_timber(test_file)), name)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.