#describe #testing #rspec

yanked yotsuba

RSpec-style testing for Rust

0.0.2 Aug 10, 2019
0.0.1 Jul 24, 2019

#5 in #rspec

MIT license

6KB
88 lines

Yotsuba

An RSpec-style test framework for Rust.

Build Status Download Count Version

Getting started

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)
  });
});

No runtime deps