Crates.io | yotsuba |
lib.rs | yotsuba |
version | 0.0.2 |
source | src |
created_at | 2019-07-24 02:17:14.109403 |
updated_at | 2019-08-10 02:43:05.776283 |
description | RSpec-style testing for Rust. |
homepage | |
repository | |
max_upload_size | |
id | 151202 |
size | 6,663 |
An RSpec-style test framework for Rust.
Yotsuba is a collection of macros and matchers that allow for quicker testing and more readable tests.
#[macro_use] extern crate yotsuba;
fn your_cool_function(num: u64) -> u64 { return num * num }
describe!(your_cool_function, {
it!(does_what_you_think_it_does, {
let cool_result = your_cool_function(5);
expect!(cool_result; to equal 25)
});
it!(does_not_do_what_it_should_not, {
let cool_result = your_cool_function(10);
expect!(cool_result; to not_equal 7)
});
});