tests/testthat/test-dframe.R

context("dframe")

df <- sample_data_1

test_that("dframe basic use without lat/long vars works", {
  skip_on_cran()

  aa <- suppressMessages(dframe(df))

  expect_is(aa, "data.frame")
  expect_is(aa, "tbl_df")
})

test_that("dframe fails well", {
  skip_on_cran()

  expect_error(dframe(),
               "argument \"x\" is missing")
  expect_error(dframe("things"),
               "no 'dframe' method for")
})

Try the scrubr package in your browser

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

scrubr documentation built on June 12, 2021, 9:06 a.m.