tests/testthat/test_hello.R

context("hello-script")

test_that("greet function working", {
  expect_identical(greet("Mary"), "Hello Mary")
  expect_error(greet(2))
  expect_error(greet(TRUE))
  expect_identical(length(greet(c("Mary", "Mark"))) == 2)
})
mfoos/MFP documentation built on May 21, 2019, 8:07 a.m.