Skip to content

Commit 07874b5

Browse files
committed
Skip long-running tests on CRAN #207
1 parent 6c24f27 commit 07874b5

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

tests/testthat/test-0-snapshots.R

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,35 +65,36 @@ test_that("set http/https correctly", {
6565

6666

6767
context("is.404")
68-
describe("is.404 works with http", {
69-
it("works on http", {
70-
expect_true(is.404("http://mran.revolutionanalytics.com/snapshot/1972-01-01"))
71-
expect_false(is.404("http://mran.revolutionanalytics.com/snapshot"))
72-
expect_false(is.404("http://mran.revolutionanalytics.com/snapshot/2015-05-01"))
68+
test_that("is.404", {
69+
describe("is.404 works with http", {
70+
it("works on http", {
71+
expect_true(is.404("http://mran.revolutionanalytics.com/snapshot/1972-01-01"))
72+
expect_false(is.404("http://mran.revolutionanalytics.com/snapshot"))
73+
expect_false(is.404("http://mran.revolutionanalytics.com/snapshot/2015-05-01"))
74+
})
7375
})
74-
})
75-
76-
describe("is.404 works with https", {
7776

78-
it("works on https", {
79-
if(!httpsSupported()) skip("https not supported")
80-
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot/1972-01-01"))
81-
expect_false(is.404("https://mran.revolutionanalytics.com/snapshot"))
82-
expect_false(is.404("https://mran.revolutionanalytics.com/snapshot/2015-05-01"))
77+
describe("is.404 works with https", {
8378

84-
})
85-
})
86-
87-
describe("is.404 gracefully deals with https URLs when https not supported", {
88-
89-
it("works even when https is not supported", {
90-
with_mock(`checkpoint:::httpsSupported` = function(mran) FALSE, {
91-
# if(!httpsSupported()) skip("https not supported")
79+
it("works on https", {
80+
if(!httpsSupported()) skip("https not supported")
9281
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot/1972-01-01"))
93-
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot"))
94-
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot/2015-05-01"))
82+
expect_false(is.404("https://mran.revolutionanalytics.com/snapshot"))
83+
expect_false(is.404("https://mran.revolutionanalytics.com/snapshot/2015-05-01"))
84+
9585
})
86+
})
87+
88+
describe("is.404 gracefully deals with https URLs when https not supported", {
9689

90+
it("works even when https is not supported", {
91+
with_mock(`checkpoint:::httpsSupported` = function(mran) FALSE, {
92+
# if(!httpsSupported()) skip("https not supported")
93+
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot/1972-01-01"))
94+
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot"))
95+
expect_true(is.404("https://mran.revolutionanalytics.com/snapshot/2015-05-01"))
96+
})
97+
98+
})
9799
})
98100
})
99-

0 commit comments

Comments
 (0)