Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechkral committed Feb 5, 2024
1 parent 6a44c8f commit 6fd40cd
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 11 deletions.
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,7 @@

`cargo fixture` is a cargo extension that let's you surround `cargo test` with arbitrary Rust setup and teardown code.

In pseudo-code:

```rust
cargo fixture [args...] {
fixture.rs {
// your setup code
let result = cargo test [args...]
// your cleanup code
}
}
```
<a href="doc/diagram.png" target="_blank"><img src="doc/diagram-thumb.png" style="float:right"/></a>

It can be used to run network servers that tests connect to, spin up docker containers, prepare test data, check for presence of programs,... or really anything that can be done from Rust code. Any provided resources can be released after `cargo test` finishes, whether manually, using RAII guards or closures.

Expand Down
Binary file added doc/diagram-thumb.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/diagram.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 152 additions & 0 deletions doc/diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6fd40cd

Please sign in to comment.