tests/testthat/test_line_insert.R

context("line_insert")

test_that("line_insert returns a closure", {
  expect_type(line_insert(strwrap, 1, quote(print(""))), "closure")
})

test_that("line_insert throws an error non-integer is given", {
  expect_error(line_insert(strwrap, 1.5, quote(print(""))))
})

Try the frite package in your browser

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

frite documentation built on July 1, 2018, 5:04 p.m.