tests/testthat/test-borrow_chapter.R

test_that("Borrow chapter", {
  testthat::skip_on_cran()
  parent_doc <- list.files(
    pattern = "parent_doc.Rmd$",
    recursive = TRUE,
    system.file("extdata", package = "ottrpal"),
    full.names = TRUE
  )

  rmarkdown::render(parent_doc)

  testthat::expect_true(
    file.exists(
      file.path(dirname(parent_doc), "parent_doc.html"))
  )
})

Try the ottrpal package in your browser

Any scripts or data that you put into this service are public.

ottrpal documentation built on April 3, 2025, 7:46 p.m.