tests/testthat/test_gmstring.R

# Run very simple test on good_morning
library(classex)
context("Good morning function")

gm_drew <- good_morning("Drew")

test_that("good_morning returns a character", {# Label of test
  expect_equal(class(gm_drew), "character") # expectation 1
  expect_error(good_morning()) # expectation 2
})
adsteen/classex documentation built on May 10, 2019, 7:26 a.m.