36 releases (16 breaking)

0.17.1 Apr 28, 2019
0.17.0 Mar 25, 2019
0.16.0 Feb 18, 2019
0.14.1 Dec 21, 2018
0.1.4 Jan 11, 2016

#8 in Testing

Download history 713/week @ 2019-01-13 502/week @ 2019-01-20 373/week @ 2019-01-27 611/week @ 2019-02-03 510/week @ 2019-02-10 630/week @ 2019-02-17 598/week @ 2019-02-24 1074/week @ 2019-03-03 1167/week @ 2019-03-10 1548/week @ 2019-03-17 1937/week @ 2019-03-24 1458/week @ 2019-03-31 2001/week @ 2019-04-07 2399/week @ 2019-04-14 2543/week @ 2019-04-21

5,596 downloads per month
Used in 37 crates

MIT license

61KB
903 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

~4.5MB
~73K SLoC