Skip to content

Commit

Permalink
.Rprofile files don't seem to get copyed at R cmd check time. Omit them
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Dec 15, 2019
1 parent 0d13d9f commit c082d19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion tests/testthat/public-api/renvpkg/.Rprofile

This file was deleted.

1 change: 0 additions & 1 deletion tests/testthat/public-api/xyzpackage/.Rprofile

This file was deleted.

12 changes: 6 additions & 6 deletions tests/testthat/test-public_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test_that("styler can style package and exclude some directories", {
styled <- style_pkg(testthat_file("public-api", "xyzpackage"),
exclude_dirs = "tests"
)
length(styled) == 2
nrow(styled) == 1
}))
})

Expand Down Expand Up @@ -51,38 +51,38 @@ test_that("styler can style directories and exclude", {
testthat_file("public-api", "renvpkg"),
exclude_dirs = "renv"
)
nrow(styled) == 3
nrow(styled) == 2
}))
capture_output(expect_true({
styled <- style_dir(
testthat_file("public-api", "renvpkg"),
exclude_dirs = c("renv", "tests/testthat")
)
nrow(styled) == 2
nrow(styled) == 1
}))

capture_output(expect_true({
styled <- style_dir(
testthat_file("public-api", "renvpkg"),
exclude_dirs = "./renv"
)
nrow(styled) == 3
nrow(styled) == 2
}))

capture_output(expect_true({
styled <- style_dir(
testthat_file("public-api", "renvpkg"),
exclude_dirs = "./renv", recursive = FALSE
)
nrow(styled) == 1
nrow(styled) == 0
}))

capture_output(expect_true({
styled <- style_dir(
testthat_file("public-api", "renvpkg"),
recursive = FALSE
)
nrow(styled) == 1
nrow(styled) == 0
}))
})

Expand Down

0 comments on commit c082d19

Please sign in to comment.