tests/testthat/test-rebuild.R

test_that("rebuild forces a package to rebuilt, bypassing cache", {

  renv_tests_scope("bread")
  init()

  records <- rebuild("bread")
  expect_length(records, 1L)

})

test_that("rebuild installs latest-available package if not installed", {

  renv_tests_scope()
  init()

  rebuild("bread")
  expect_true(renv_package_installed("bread"))

})

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.