context('Errors')
test_that('Throws errors', {
throws_error(fars_read(filename = "an_other_inexistent_filename"))
throws_error(fars_read_years(years = 3500))
throws_error(fars_summarize_years(years = 25000))
throws_error(make_filename(year = 'two thousand fourteen'))
})
context("File Loading")
testthat::test_that("make_filename", {
result <- farsfun::make_filename(2017)
testthat::expect_is(result, "character")
testthat::expect_true(length(result) == 1)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.