context("Testing getter functions")
test_that("testing animal selection", {
animal_names <- names(obj)
expect_error(selection <- filter_animals(obj, animal_names[1:2]), NA)
expect_length(selection, 2)
expect_s3_class(selection, "avoidance.multiple")
expect_length(filter_animals(obj, animal_names[1]), 1)
expect_length(filter_animals(obj, "Nobody would name animal in this way"), 0)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.