tests/testthat/test-example.R

context("Mytests")

test_that("square_throws_error_with_character_input",{
  expect_error(square("hello"))
})

test_that("square_of_1_is_1",{
  expect_equal(1,square(1))
})
nsb334/travis-training documentation built on May 23, 2017, 5:17 p.m.