Expand description
§dev-fixtures
Repeatable test environments, sample data, and controlled inputs for
Rust. Part of the dev-* verification suite.
§Why
Tests are only useful if they are repeatable. AI agents in particular need fixtures that:
- Build the same way every time
- Clean themselves up
- Provide both happy-path and adversarial inputs
dev-fixtures provides primitives for building those environments.
§Quick example
use dev_fixtures::TempProject;
let project = TempProject::new()
.with_file("Cargo.toml", "[package]\nname = \"sample\"\n")
.with_file("src/lib.rs", "pub fn answer() -> u32 { 42 }")
.build()
.unwrap();
// project.path() points at a temp directory.
// It is deleted automatically when `project` is dropped.§Modules
tree—FileTreebuilder with workspace and symlink helpers.adversarial— generators for oversized, malformed, and unusual inputs.golden— snapshot-based verification withdev-reportintegration.mock— deterministic mock data (CSV, JSON, bytes).
Modules§
- adversarial
- Adversarial input generators.
- golden
- Golden-file snapshot verification.
- mock
- Deterministic mock data generators.
- tree
- File-tree builders.
Structs§
- Fixture
Producer - Producer wrapper that runs a self-test of fixture lifecycle and
emits a
Report. - Temp
Project - A temporary project directory that auto-cleans on drop.
- Temp
Project Builder - Builder for
TempProject.
Traits§
- Fixture
- A trait for any fixture that can be set up and torn down.