tests/testthat/test-update-renv.R

context("update renv")

test_that("it works", {
  # fails on CRAN r-devel-linux-x86_64-fedora-* with
  # failed to find source for 'renv 0.14.0' in package repositories
  # but passes on R-hub Fedora Linux, R-devel, clang, gfortran
  skip_on_cran()

  setup({
    jetpack::init()

    record <- list(Package="renv", Version="0.15.5", Source="CRAN")
    renv::record(list(renv=record), project=getwd())

    jetpack::install()
    expectFileContains("renv.lock", "0.15.5")

    jetpack::update("renv")
    refuteFileContains("renv.lock", "0.15.5")
  })
})

Try the jetpack package in your browser

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

jetpack documentation built on Oct. 31, 2022, 5:07 p.m.