tests/testthat/test-rebuild.R
raw| 1 | |
| 2 | test_that("rebuild forces a package to rebuilt, bypassing cache", { |
| 3 | |
| 4 | renv_tests_scope("bread") |
| 5 | init() |
| 6 | |
| 7 | records <- rebuild("bread") |
| 8 | expect_length(records, 1L) |
| 9 | |
| 10 | }) |
| 11 | |
| 12 | test_that("rebuild installs latest-available package if not installed", { |
| 13 | |
| 14 | renv_tests_scope() |
| 15 | init() |
| 16 | |
| 17 | rebuild("bread") |
| 18 | expect_true(renv_package_installed("bread")) |
| 19 | |
| 20 | }) |