File: test-documentation.R

package info (click to toggle)
r-cran-usethis 3.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,228 kB
  • sloc: sh: 26; makefile: 17; cpp: 6; ansic: 3
file content (12 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
test_that("use_package_doc() requires a package", {
  create_local_project()
  expect_false(has_package_doc())
  expect_usethis_error(use_package_doc(), "not an R package")
})

test_that("use_package_doc() creates the promised file", {
  create_local_package()
  use_package_doc()
  expect_proj_file("R", paste0(project_name(), "-package.R"))
  expect_true(has_package_doc())
})