Skip to content

Commit

Permalink
add snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
kbvernon committed Sep 7, 2024
1 parent ebb2f18 commit 23e2cb1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/testthat/test-use_msrv.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test_that("use_msrv() modifies the MSRV in the DESCRIPTION", {
skip_if_not_installed("usethis")

path <- withr::local_package("testpkg")

# capture setup messages
withr::local_options(usethis.quiet = FALSE)

use_extendr(path, quiet = TRUE)
use_msrv("1.70")

expect_snapshot(cat(readLines("DESCRIPTION"), sep = "\n"))
})

Check warning on line 13 in tests/testthat/test-use_msrv.R

View workflow job for this annotation

GitHub Actions / lint

file=tests/testthat/test-use_msrv.R,line=13,col=3,[trailing_blank_lines_linter] Missing terminal newline.

0 comments on commit 23e2cb1

Please sign in to comment.