R/expect_printed_output.R

Defines functions expect_printed_output

expect_printed_output <- function(object, update = FALSE) {
  file <- rlang::quo_text(rlang::enquo(object))
  
  testthat::expect_known_output(
    object, paste0("ref-", file),
    print = TRUE, update = update
  )
  
  invisible(object)
}
maurolepore/handy documentation built on May 21, 2019, 1:37 p.m.