Skip to content

Commit 2008535

Browse files
authored
Rely on the testing infrastructure to load helpers (#2530)
1 parent 2c642ab commit 2008535

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

R/test.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test <- function(pkg = ".", filter = NULL, stop_on_failure = FALSE, export_all =
3838
cli::cli_inform(c(i = "Testing {.pkg {pkg$package}}"))
3939
withr::local_envvar(r_env_vars())
4040

41-
load_package <- load_package_if_needed(pkg)
41+
load_package <- load_package_for_testing(pkg)
4242
testthat::test_local(
4343
pkg$path,
4444
filter = filter,
@@ -67,7 +67,7 @@ test_active_file <- function(file = find_active_file(), ...) {
6767
rstudioapi::executeCommand("activateConsole", quiet = TRUE)
6868
}
6969

70-
load_package <- load_package_if_needed(pkg)
70+
load_package <- load_package_for_testing(pkg)
7171
testthat::test_file(
7272
test_files,
7373
package = pkg$package,
@@ -76,11 +76,11 @@ test_active_file <- function(file = find_active_file(), ...) {
7676
)
7777
}
7878

79-
load_package_if_needed <- function(pkg) {
79+
load_package_for_testing <- function(pkg) {
8080
if (pkg$package == "testthat") {
8181
# Must load testthat outside of testthat so tests are run with
8282
# dev testthat
83-
load_all(pkg$path, quiet = TRUE)
83+
load_all(pkg$path, quiet = TRUE, helpers = FALSE)
8484
"none"
8585
} else {
8686
"source"

0 commit comments

Comments
 (0)