tests/testthat/test-set_here.R

test_that("set_here() creates file", {
  local_project()

  expect_message(set_here(path = here()), "[Cc]reated file")
  expect_true(file.exists(here(".here")))
  expect_message(set_here(path = here()), "already exists")
})

Try the here package in your browser

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

here documentation built on Jan. 13, 2021, 12:17 p.m.