tests/testthat/test-hello.R

context("my hello script")

test_that("hello function says hi or errors", {
  err <- "`yay` must be logical."
  msg <- "Hello, world!"
  expect_equal(hello(TRUE), msg)
  expect_error(hello(5), err)
})
leonawicz/testrepo documentation built on May 9, 2019, 5:51 a.m.