33 releases (14 breaking)

0.15.1 Feb 4, 2019
0.14.1 Dec 21, 2018
0.14.0 Nov 18, 2018
0.12.0 Jun 27, 2018
0.1.4 Jan 11, 2016

#6 in Testing

Download history 654/week @ 2018-10-24 716/week @ 2018-10-31 1035/week @ 2018-11-07 1437/week @ 2018-11-14 1125/week @ 2018-11-21 1356/week @ 2018-11-28 679/week @ 2018-12-05 927/week @ 2018-12-12 550/week @ 2018-12-19 327/week @ 2018-12-26 646/week @ 2019-01-02 605/week @ 2019-01-09 691/week @ 2019-01-16 384/week @ 2019-01-23 482/week @ 2019-01-30

3,322 downloads per month
Used in 29 crates

MIT license

195KB
870 lines

HTTP mocking for Rust!

Get it on crates.io.

Documentation available at https://docs.rs/mockito.

Before upgrading, make sure to check out the changelog.

Contribution Guidelines

  1. Check the existing issues and pull requests.
  2. One commit is one feature - consider squashing.
  3. :shipit:

Development

Run tests:

cargo test

Run clippy

rustup component add clippy-preview
touch src/lib.rs  # Touch the file to force cargo to rerun clippy on the project
cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery

Release:

cargo package && cargo publish

Run benchmarks:

rustup install nightly
rustup run nightly cargo bench

Debug output from tests

In your project, add env_logger crate, and init it before each test:

#[test]
fn example_test() {
    let _ = env_logger::try_init();
    /**/
}

and run tests with:

RUST_LOG=mockito=debug cargo test

Logo courtesy to http://niastudio.net 👌

Dependencies

~3MB
~57K SLoC