Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mvankessel-EMC committed Dec 3, 2024
1 parent 1eab24a commit d06c224
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 7 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 0.1.14
Date: 2024-11-28 15:02:25 UTC
SHA: 6b421989f4c43662982bbe2723d109a843f5e982
Version: 0.1.15
Date: 2024-11-29 14:23:55 UTC
SHA: 92610472fed267d36c1e1d2ce5a421c6379a5565
16 changes: 12 additions & 4 deletions tests/testthat/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ library(testthat)
library(git2r)

path <- file.path(tempdir(), "glue")
repoCloned <- NULL

if (!is.null(curl::nslookup("captive.apple.com", error = FALSE))) {
clone(
url = "https://github.com/tidyverse/glue",
local_path = path
)
tryCatch({
clone(
url = "https://github.com/tidyverse/glue",
local_path = path
)
repoCloned <- TRUE
}, error = function(e) {
repoCloned <- FALSE
})
} else {
repoCloned <- FALSE
}

withr::defer({
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-addPareArticle.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
test_that("minimal", {
skip_if_not(checkSuggests())
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-checkDependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test_that("void", {

test_that("minimal", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand All @@ -28,6 +29,7 @@ test_that("minimal", {

test_that("parallel", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-getApplyCall.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("minimal", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-getDlplyCall.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

test_that("minimal", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-getDoCall.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("minimal", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-getFunCall.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test_that("minimal", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-getMultiLineFun.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

test_that("regular use", {
skip_if_offline()
skip_if_not(repoCloned)

repo <- Repository$new(path)

Expand Down

0 comments on commit d06c224

Please sign in to comment.