File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -10,21 +10,24 @@ test_that("styler can style package", {
1010})
1111
1212test_that(" styler can style package and exclude some directories" , {
13- capture_output(expect_true({
13+ capture_output(
1414 styled <- style_pkg(testthat_file(" public-api" , " xyzpackage" ),
1515 exclude_dirs = " tests"
1616 )
17- nrow(styled ) == 1
18- }))
17+ )
18+ expect_true(nrow(styled ) == 1 )
19+ expect_false(any(grepl(" tests/testthat/test-package-xyz.R" , styled $ file )))
1920})
2021
2122test_that(" styler can style package and exclude some sub-directories" , {
22- capture_output(expect_true({
23+ capture_output(
2324 styled <- style_pkg(testthat_file(" public-api" , " xyzpackage" ),
2425 exclude_dirs = " tests/testthat"
2526 )
26- nrow(styled ) == 2
27- }))
27+ )
28+ expect_true(nrow(styled ) == 2 )
29+ expect_true(any(grepl(" tests/testthat.R" , styled $ file )))
30+ expect_false(any(grepl(" tests/testthat/test-package-xyz.R" , styled $ file )))
2831})
2932
3033
You can’t perform that action at this time.
0 commit comments