mockito 0.20.0

HTTP mocking for Rust.

Get it on

Documentation available at

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:


Run tests:

cargo test

Run clippy

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


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:

fn example_test() {
    let _ = env_logger::try_init();
    /* … */

and run tests with:

RUST_LOG=mockito=debug cargo test

Logo courtesy to :ok_hand: