tests/testthat/test-setLibrary.r

context("setLibrary-1")
test_that("setLibrary", {

  opts_old <- getOption(".rapp")
  
  expect_true(res <- setLibrary())
  expect_equal(getRappOption(".rte/lib"), .libPaths()[1])
  expect_true(res <- setLibrary(value = tempdir()))
  expect_equal(getRappOption(".rte/lib"), tempdir())
               
  on.exit(options(".rapp" = opts_old))
  
  }
)
rappster/rapp documentation built on May 26, 2019, 11:56 p.m.