# WARNING - Generated by {fusen} from /dev/flat_full.Rmd: do not edit by hand
test_that("my_median works properly and show error if needed", {
expect_true(my_median(1:12) == 6.5)
expect_error(my_median("text"))
})
# Test with your dataset in "inst/"
datafile <- system.file("nyc_squirrels_sample.csv", package = "pulso2")
nyc_squirrels <- read.csv(datafile)
# Apply test on my function
test_that("my_median works properly with internal dataset", {
expect_equal(my_median(nyc_squirrels[,"hectare_squirrel_number"]), 3)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.