Skip to content

Commit

Permalink
fix broken test, test outcome, not console msg
Browse files Browse the repository at this point in the history
  • Loading branch information
slager committed Mar 27, 2024
1 parent 95957a0 commit 85f441d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/testthat/test-document.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ test_that("documentation is built via document()", {
)
flush(connection)
close(connection)
expect_output(
document(file.path(tempdir(), "subsetCars"), lib = temp_libpath),
"Writing testmarkdownroxygen.Rd"

path_chk <- file.path(tempdir(), "subsetCars")
files_before <- list.files(path_chk, recursive = TRUE)
document(path_chk, lib = temp_libpath)
files_after <- list.files(path_chk, recursive = TRUE)
expect_true(
setdiff(files_after, files_before) == "man/testmarkdownroxygen.Rd"
)

v <- vignette(package = "subsetCars", lib.loc = temp_libpath)
expect_equal(v$results[, "Item"], "subsetCars")
unlink(file.path(tempdir(), "subsetCars"),
Expand Down

0 comments on commit 85f441d

Please sign in to comment.