35 releases (16 breaking)

0.17.0 Mar 25, 2019
0.15.1 Feb 4, 2019
0.14.1 Dec 21, 2018
0.14.0 Nov 18, 2018
0.1.4 Jan 11, 2016

#9 in Testing

Download history 443/week @ 2018-12-20 480/week @ 2018-12-27 554/week @ 2019-01-03 685/week @ 2019-01-10 626/week @ 2019-01-17 345/week @ 2019-01-24 502/week @ 2019-01-31 609/week @ 2019-02-07 600/week @ 2019-02-14 553/week @ 2019-02-21 935/week @ 2019-02-28 1234/week @ 2019-03-07 1275/week @ 2019-03-14 1946/week @ 2019-03-21 1357/week @ 2019-03-28

3,730 downloads per month
Used in 34 crates

MIT license

196KB
911 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