File: test-package.R

package info (click to toggle)
r-cran-pkgload 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,164 kB
  • sloc: sh: 13; cpp: 9; ansic: 8; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 351 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
local_load_all_quiet()

test_that("it can load from outside of package root", {
  expect_false('testHooks' %in% loadedNamespaces())
  load_all(file.path("testHooks"))

  expect_true('testHooks' %in% loadedNamespaces())
  expect_true(is_dev_package("testHooks"))

  unload(file.path("testHooks"))
  expect_false('testHooks' %in% loadedNamespaces())
})