tests/testthat/test-scaffold.R

test_that("renv.lock is created when scaffold is called", {
  renv_tests_scope()
  scaffold()
  expect_true(file.exists("renv.lock"))
})

test_that("scaffold() accepts project settings", {
  renv_tests_scope()
  scaffold(settings = list(ignored.packages = "A"))
  ignored <- settings$ignored.packages()
  expect_identical(ignored, "A")
})

Try the renv package in your browser

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

renv documentation built on Sept. 19, 2023, 9:06 a.m.