tests/testthat/test-run-examples.R

test_that("Can run an example", {
  pkg <- "testHelp"
  expect_output(
    suppressMessages(run_examples(pkg = pkg, document = FALSE)),
    "You called foofoo.",
    fixed = TRUE
  )
})
r-lib/devtools documentation built on Feb. 17, 2024, 5:32 p.m.