Skip to main content

Module fixture

Module fixture 

Source
Expand description

Temporary file trees for integration tests. Files for integration tests, written through one call instead of fs::create_dir_all, fs::write, and an expect per file.

A Suite owns a temporary directory named after the test file, and each Suite::scenario owns its own directory inside it. Both are removed when the value drops, so a test cleans up by going out of scope. A write that fails panics with the path it could not write: a broken fixture is a broken test, and the message says which file.

Structsยง

Root
A temporary directory a test writes files into, alive no longer than the suite it sits in.
Suite
A temporary directory for one test file.