Skip to content

Commit 6a29ecf

Browse files
fix test
1 parent 6a59db2 commit 6a29ecf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
* `.onLoad()` method no longer broken with {cli} >= 3.1 (#893).
2929
* Piped function without brackets `substitute(x %>% y)` don't get `()` added
30-
anymore, as this can change outcome of the code (#876).
30+
anymore for one level deep (not more yet, see #889), as this can change
31+
outcome of the code (#876).
3132
* rules that add tokens don't break stylerignore sequences anymore (#891).
3233
* Add vignette on distributing style guide (#846, #861).
3334
* Alignment detection respects stylerignore (#850).

tests/testthat/test-public_api.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,8 @@ test_that("Can properly determine style_after_saving", {
477477
})
478478

479479
test_that("Can display warning on unset styler cache", {
480-
withr::local_seed(7)
481480
withr::local_options(styler.cache_root = NULL)
481+
withr::local_seed(7)
482482
expect_warning(
483483
ask_to_switch_to_non_default_cache_root(ask = TRUE),
484484
'options(styler.cache_root = "styler-perm")',
@@ -487,7 +487,7 @@ test_that("Can display warning on unset styler cache", {
487487
})
488488

489489
test_that("Can display warning on unset styler cache", {
490+
withr::local_options(styler.cache_root = "styler-perm")
490491
withr::local_seed(7)
491-
withr::local_options("styler.cache_root = NULL")
492492
expect_silent(ask_to_switch_to_non_default_cache_root(ask = TRUE))
493493
})

0 commit comments

Comments
 (0)