Test that each rule of a registry has a red and a green test
Source:R/expect_rules.R
expect_rules_covered.Rdexpect_rules_covered() is one testthat expectation. It fails when a rule
of the registry rules has no record of expect_rule_red() or no record
of expect_rule_green() in this R session. The failure message names each
of these rules.
Arguments
- rules
The registry: a named list of
rule()entries.
Details
Call it in the test file whose name sorts last, such as
test-zzz_rule_coverage.R. testthat runs the test files in the order of
their names, in one R session, so that file sees the records of all the
others.
See also
Other test helpers:
expect_rule_red()