context('assert')
local({
stub(assert, expect_false) <- function(x) if (identical(x, TRUE)) stop()
test_that('it lets no error go through', {
assert(TRUE)
})
test_that('it fails on an error', {
expect_error(assert(stop()))
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.