diff --git a/NEWS.md b/NEWS.md index 4befc71e9..051477b72 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # testthat (development version) +* `skip_if_offline()` now uses `captive.apple.com` by default. This is the + host that Apple devices use to check that they're online so should be + a higher reliability host than `r-project.org` (@jdblischak, #1890). + * `test_file(desc = )` will now find `describe()` tests as well as `testthat()` tests (#1903). diff --git a/R/skip.R b/R/skip.R index f602ca925..d0a1c7d97 100644 --- a/R/skip.R +++ b/R/skip.R @@ -122,7 +122,7 @@ package_version <- function(x) { #' @export #' @rdname skip -skip_if_offline <- function(host = "r-project.org") { +skip_if_offline <- function(host = "captive.apple.com") { skip_on_cran() check_installed("curl") diff --git a/man/skip.Rd b/man/skip.Rd index 516e09b93..fa1bf7c76 100644 --- a/man/skip.Rd +++ b/man/skip.Rd @@ -22,7 +22,7 @@ skip_if(condition, message = NULL) skip_if_not_installed(pkg, minimum_version = NULL) -skip_if_offline(host = "r-project.org") +skip_if_offline(host = "captive.apple.com") skip_on_cran()