Skip to content

Commit 047c91f

Browse files
authored
Convert to testthat 3e (#2426)
1 parent 371b9cc commit 047c91f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,4 @@ Encoding: UTF-8
6767
Language: en-US
6868
Roxygen: list(markdown = TRUE)
6969
RoxygenNote: 7.2.0
70+
Config/testthat/edition: 3

tests/testthat/helper.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ create_local_package <- function() {
66
dir <- file_temp()
77

88
withr::defer(envir = parent.frame(), {
9-
proj_set(old_project, force = TRUE)
9+
usethis::ui_silence({
10+
proj_set(old_project, force = TRUE)
11+
})
1012
setwd(old_wd)
1113
dir_delete(dir)
1214
})

tests/testthat/test-install.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ expect_passes_args <- function(fn, stub, input_args = list(), expected_args) {
1616
mck <- mockery::mock(NULL)
1717
mockery::stub(fn, stub, mck)
1818

19-
suppressMessages(do.call(fn, input_args))
19+
capture.output(suppressMessages(do.call(fn, input_args)))
2020

2121
mockery::expect_called(mck, 1)
2222
mock_args <- mockery::mock_args(mck)[[1]]

0 commit comments

Comments
 (0)