Skip to content

Commit a9e8be3

Browse files
committed
update test for not to use usethis
1 parent 780cb2b commit a9e8be3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/testthat/test-use_lintr.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ test_that("use_lintr with type = full also works", {
3737
})
3838

3939
test_that("use_lintr add .lintr to .Rbuildignore for packages", {
40-
skip_if_not_installed("usethis")
41-
4240
tmp <- withr::local_tempdir()
43-
usethis::create_package(tmp)
44-
setwd(tmp)
41+
tmp_package_dir <- paste0(tmp, "/package")
42+
package_dir <- test_path("dummy_packages", "package")
43+
dir.create(tmp_package_dir)
44+
file.copy(package_dir, tmp, recursive = TRUE)
45+
setwd(tmp_package_dir)
4546
lintr_file <- use_lintr()
4647
expect_true(file.exists(lintr_file))
4748
expect_true("^\\.lintr$" %in% readLines(".Rbuildignore"))

0 commit comments

Comments
 (0)