Skip to content

Commit 5f4d9e7

Browse files
committed
Correct tests
1 parent a89eeb5 commit 5f4d9e7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/testthat/test-public_api-3.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,31 +120,31 @@ test_that("scope can be specified as is", {
120120

121121
test_that("Can properly determine style_after_saving", {
122122
withr::with_envvar(list(save_after_styling = TRUE), {
123-
expect_warning(op <- save_after_styling_is_active(), "is depreciated")
124-
expect_equal(op, TRUE)
123+
expect_warning(op <- save_after_styling_is_active(), "is deprecated")
124+
expect_true(op)
125125
})
126126

127127
withr::with_envvar(list(save_after_styling = FALSE), {
128-
expect_warning(op <- save_after_styling_is_active(), "is depreciated")
129-
expect_equal(op, FALSE)
128+
expect_warning(op <- save_after_styling_is_active(), "is deprecated")
129+
expect_false(op)
130130
})
131131

132132

133133
withr::with_options(list(styler.save_after_styling = TRUE), {
134134
expect_silent(op <- save_after_styling_is_active())
135-
expect_equal(op, TRUE)
135+
expect_true(op)
136136
})
137137

138138
withr::with_options(list(styler.save_after_styling = TRUE), {
139139
withr::with_envvar(list(save_after_styling = FALSE), {
140-
expect_warning(op <- save_after_styling_is_active(), "is depreciated")
141-
expect_equal(op, TRUE)
140+
expect_warning(op <- save_after_styling_is_active(), "is deprecated")
141+
expect_true(op)
142142
})
143143
})
144144

145145
withr::with_options(list(styler.save_after_styling = FALSE), {
146146
expect_silent(op <- save_after_styling_is_active())
147-
expect_equal(op, FALSE)
147+
expect_false(op)
148148
})
149149
})
150150

0 commit comments

Comments
 (0)