Skip to content

Commit

Permalink
update test for not to use usethis
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Jan 9, 2023
1 parent 780cb2b commit a9e8be3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/testthat/test-use_lintr.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ test_that("use_lintr with type = full also works", {
})

test_that("use_lintr add .lintr to .Rbuildignore for packages", {
skip_if_not_installed("usethis")

tmp <- withr::local_tempdir()
usethis::create_package(tmp)
setwd(tmp)
tmp_package_dir <- paste0(tmp, "/package")
package_dir <- test_path("dummy_packages", "package")
dir.create(tmp_package_dir)
file.copy(package_dir, tmp, recursive = TRUE)
setwd(tmp_package_dir)
lintr_file <- use_lintr()
expect_true(file.exists(lintr_file))
expect_true("^\\.lintr$" %in% readLines(".Rbuildignore"))
Expand Down

0 comments on commit a9e8be3

Please sign in to comment.