#check the creating initial contestants
test_that("check creating the initial contestants", {
expect_equal(nrow(createContestants(6)), 6)
expect_equal(ncol(createContestants(6)), 2)
expect_equal(names(createContestants(6)), c("female", "male"))
expect_identical(map_chr(createContestants(3), typeof), c("female" = "character", "male" = "character"))
expect_error(createContestants("a"), "contestants MUST be a whole number greater than 1")
expect_error(createContestants(1), "contestants MUST be a whole number greater than 1")
expect_error(createContestants(FALSE), "contestants MUST be a whole number greater than 1")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.