test_context

Attribute Macro test_context 

Source
#[test_context]
Expand description

Macro to use on tests to add the setup/teardown functionality of your context.

Ordering of this attribute is important, and typically test_context should come before other test attributes. For example, the following is valid:

#[test_context(MyContext)]
#[test]
fn my_test() {
}

The following is NOT valid…

#[test]
#[test_context(MyContext)]
fn my_test() {
}