Macro fungus::create_test_setup_func[][src]

macro_rules! create_test_setup_func {
    () => { ... };
}

Create the test setup function to be called in tests to disable RUST_BACKTRACE and create a directory to work in for testing that depends on modifying files on disk. The intent is to provide a thread safe space from which to manipulate files during a test.

setup accepts two arguments root and func_name. root and func_name are joined as a path and treated as the directory path that will be created for tests.

Examples

use fungus::assert::*;

create_test_setup_func!();
setup("tests/temp", "create_test_setup_func");
assert_dir!("tests/temp/create_test_setup_func");
assert_remove_all!("tests/temp/create_test_setup_func");