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.
cargo fmt
.Run tests:
sh
cargo test
...or run tests using a different toolchain:
sh
rustup run --install 1.36.0 cargo test
...or run tests while disabling the default features (e.g. the colors):
sh
cargo test --no-default-features
Mockito uses rustfmt as a general code style.
Install rustfmt
:
sh
rustup component add rustfmt
Format code:
sh
cargo fmt
Some editors might provide a plugin to format your Rust code automatically.
Mockito uses clippy as a linter.
Install clippy
:
sh
rustup component add clippy-preview
Run the linter:
```sh
touch src/lib.rs
cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery ```
...or run the linter using a different toolchain:
sh
rustup run --install 1.36.0 cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery
Release:
sh
cargo publish
Install rust nightly
:
sh
rustup install nightly
Run benchmarks:
sh
rustup run nightly cargo bench
Logo courtesy to http://niastudio.net :ok_hand: