library(mockery)
test_that("yesno", {
yesno_mock <- mock(TRUE)
stub(yesno, "interactive", yesno_mock)
stub(yesno, "menu", 1)
expect_is(yesno(), "logical")
expect_called(yesno_mock, 1)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.