tests/testthat/test-scan_numerics.R

context("test-scan_numerics.R")

test_that("scan-numerics works", {

  data(iris)

  # Test if there are numeric variables
  res <- scan_numerics(iris)
  expect_is(res, class = "data.frame")

  # Test if there is not numeric variable
  expect_error(scan_numerics(iris["Species"]),
               "There should be numerical columns in .data")
})
BenjaminLouis/datascan documentation built on May 26, 2019, 1:35 p.m.