rule

fun <Rule : TestRule> rule(rule: Rule): Rule(source)

Registers a JUnit4 rule.

Rules wrap around the test execution outside-in, with the rule registered last being closest to the test action.