test_injection <- function(desc, code) {
on.exit({
.injected_functions <<- new.env(parent=emptyenv())
})
test_that(desc, code)
}
expect_type_assertion <- function(f) {
expect_true(has_contract(f))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.