1test_that("can locate reporter from name", {
2  expect_equal(find_reporter("minimal"), MinimalReporter$new())
3  expect_equal(find_reporter("summary"), SummaryReporter$new())
4})
5
6test_that("useful error message if can't find reporter", {
7  expect_error(
8    find_reporter(c("summary", "blah")),
9    "Can not find test reporter blah"
10  )
11})
12
13test_that("character vector yields multi reporter", {
14  expect_equal(
15    find_reporter(c("summary", "stop")),
16    MultiReporter$new(
17      reporters = list(
18        SummaryReporter$new(),
19        StopReporter$new()
20      )
21    )
22  )
23})
24