@@ -5,6 +5,10 @@ test_that("release bullets don't change accidentally", {
5
5
withr :: local_options(usethis.description = NULL )
6
6
create_local_package()
7
7
8
+ local_mocked_bindings(
9
+ get_revdeps = function () " usethis"
10
+ )
11
+
8
12
# First release
9
13
expect_snapshot(
10
14
writeLines(release_checklist(" 0.1.0" , on_cran = FALSE )),
@@ -52,6 +56,10 @@ test_that("construct correct revdep bullet", {
52
56
create_local_package()
53
57
env <- env(release_extra_revdeps = function () c(" waldo" , " testthat" ))
54
58
59
+ local_mocked_bindings(
60
+ get_revdeps = function () " usethis"
61
+ )
62
+
55
63
expect_snapshot({
56
64
release_revdepcheck(on_cran = FALSE )
57
65
release_revdepcheck(on_cran = TRUE , is_posit_pkg = FALSE )
@@ -64,7 +72,8 @@ test_that("RStudio-ness detection works", {
64
72
withr :: local_options(usethis.description = NULL )
65
73
create_local_package()
66
74
local_mocked_bindings(
67
- tidy_minimum_r_version = function () numeric_version(" 3.6" )
75
+ tidy_minimum_r_version = function () numeric_version(" 3.6" ),
76
+ get_revdeps = function () " usethis"
68
77
)
69
78
70
79
expect_false(is_posit_pkg())
@@ -245,3 +254,17 @@ test_that("default_cran_mirror() is respects set value but falls back to cloud",
245
254
withr :: local_options(repos = c())
246
255
expect_equal(default_cran_mirror(), c(CRAN = " https://cloud.r-project.org" ))
247
256
})
257
+
258
+ test_that(" no revdep release bullets when there are no revdeps" , {
259
+ withr :: local_options(usethis.description = NULL )
260
+ create_local_package()
261
+
262
+ local_mocked_bindings(
263
+ get_revdeps = function () NULL
264
+ )
265
+
266
+ expect_snapshot(
267
+ writeLines(release_checklist(" 1.0.0" , on_cran = TRUE )),
268
+ transform = scrub_testpkg
269
+ )
270
+ })
0 commit comments