tests/testthat/testhello.r

context("hello")

test_that("hello function works with input", {
  expect_equal(hello("world"), "hello world")
  expect_equal(hello(name="vincent"), "hello vincent")
})

test_that("hello function works without input", {
  expect_equal(hello(), "hello")
})
koaning/helloworld documentation built on May 30, 2019, 6:14 p.m.