shoulds is a fluent assertion library for Rust tests, inspired by FluentAssertions and Shouldly.
It helps you write readable, intention-revealing tests like:
use shoulds::Shouldable;
#[test]
fn adds_numbers_correctly() {
let result = 40 + 2;
result.should().eq(&42);
}The API is designed to be intuitive and discoverable, so you can express expectations naturally—with minimal boilerplate and maximum clarity.
Currently supported:
should().eq(&expected)should().ne(&unexpected)
should().be_true()should().be_false()
should().be_some()should().be_none()
should().be_ok()should().be_err()
In your Cargo.toml:
[dev-dependencies]
shoulds = "0.3.0"MIT