test_fixture

Attribute Macro test_fixture 

Source
#[test_fixture]
Expand description

Marks a module as a test fixture, enabling #[setup] and #[teardown] functionality.

ยงExample

use rust_test_framework::{test_fixture, setup, teardown};

#[test_fixture]
mod my_tests {
    #[setup]
    fn set_up() {
        println!("Setting up...");
    }

    #[teardown]
    fn tear_down() {
        println!("Tearing down...");
    }

    #[test]
    fn test_example() {
        assert!(true);
    }
}