litmus
a macro-free BDD test harness. inspired by cucumber and rspec.
Why litmus
With litmus, you can ...
write tests declaratively
with minimal overhead
all without using macros.
Major design criteria
- works with cargo-test and cargo-nextest
- offers Gherkin ergonomics
- is fast
Quickstart
Add this to your Cargo.toml:
# ./Cargo.toml
[]
= "0.4.0"
Disable the default harness for your test targets:
# ./Cargo.toml
[[]]
= ...
= ...
= false
For instructions on writing tests, refer to the section below.
Examples
Examples are available in the examples/ directory.
cargo test --example main -p litmus
cargo nextest run --example main -p litmus