tests/testthat/test-7-addGithubPackage.R

test_that("can add package from github",{

  skip_on_cran()
  skip_if_offline()

  pdb <- pkgAvail(repos = c(CRAN = getOption("minicran.mran")))
  expect_type(pdb, "character")

  # Overwrite pdb with development version of miniCRAN at github
  expect_warning(
    newpdb <- addPackageListingGithub(pdb = pdb, "andrie/miniCRAN"),
    "Overwriting package information for: miniCRAN"
  )
  expect_type(newpdb, "character")
  expect_equal(nrow(pdb), nrow(newpdb))
  expect_equal(ncol(pdb), ncol(newpdb))
})

Try the miniCRAN package in your browser

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

miniCRAN documentation built on March 18, 2022, 6:29 p.m.