testthat (version 1.0.2)

reporter-accessors: Get/set reporter; execute code in specified reporter.

Description

Changes global reporter to that specified, runs code and the returns global reporter back to previous value.

Usage

set_reporter(reporter)

get_reporter()

with_reporter(reporter, code, start_end_reporter = TRUE)

Arguments

reporter
test reporter to use
code
code block to execute
start_end_reporter
whether to start and end the reporter

Details

The with_reporter function returns the reporter that has been used for running the code.