tests/testthat/test_graceful_failures.R

context("Test that functions fail gracefully.")

test_that("dance_remove returns FALSE", {
  dance_remove()
  expect_false(dance_remove())
})

test_that("dance_tbl returns NULL", {
  dance_remove()
  expect_null(dance_tbl())
})
jhudsl/matahari documentation built on Feb. 21, 2020, 9:06 p.m.