tests/testthat/test-team_1.R

context("test-team_1")

test_that("creating dataframe for a country's map works", {
  expect_warning(team_1(file = "bla"), "file does not exist")
  expect_warning(team_1(tolerance = "bla"), "tolerance is not numeric")
  expect_warning(team_1(tolerance = -1), "tolerance must be a positive number")
  expect_equal(is.data.frame(team_1(tolerance = 0.1)), TRUE)
})
MinZhang95/Lab-3 documentation built on May 9, 2019, 2:35 p.m.