8 releases
new 0.4.1 | Apr 18, 2025 |
---|---|
0.4.0 | Apr 18, 2025 |
0.3.2 | Apr 16, 2025 |
0.2.2 | Apr 12, 2025 |
0.1.0 |
|
#230 in Testing
552 downloads per month
130KB
3K
SLoC
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
[dev-dependencies]
litmus = "0.3.2"
Disable the default harness for your test targets:
# ./Cargo.toml
[[test]]
name = ...
path = ...
harness = 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
Dependencies
~1.3–2.1MB
~38K SLoC