tests/testthat/test_regbar_data.R

context("Available data")

test_that("Error message regbar when data not provided", {
  expect_error(regbar(),"'data' must be provided")
  expect_error(regbar(hfdata), "Both 'x' and 'y' should be specified")
  expect_error(regbar(hfdata, x = centre), "Both 'x' and 'y' should be specified")
  expect_error(regbar(hfdata, y = case1), "Both 'x' and 'y' should be specified")
})


test_that("Error message regrad when data not provided", {
  expect_error(regbar(),"'data' must be provided")
})

Try the rreg package in your browser

Any scripts or data that you put into this service are public.

rreg documentation built on May 2, 2019, 9:58 a.m.