Git Product home page Git Product logo

mockito's Introduction

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. Format code with cargo fmt.
  4. :shipit:

Development

Tests

Run tests:

cargo test

...or run tests using a different toolchain:

rustup run --install 1.35.0 cargo test

...or run tests while disabling the default features (e.g. the colors):

cargo test --no-default-features

Code style

Mockito uses rustfmt as a general code style.

Install rustfmt:

rustup component add rustfmt

Format code:

cargo fmt

Some editors might provide a plugin to format your Rust code automatically.

Linter

Mockito uses clippy as a linter.

Install clippy:

rustup component add clippy-preview

Run the linter:

# Touch a file to force cargo to rerun clippy on the project
touch src/lib.rs

cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery

...or run the linter using a different toolchain:

rustup run --install 1.35.0 cargo clippy --lib --tests --all-features -- -D clippy::pedantic -D clippy::nursery

Release

Release:

cargo package && cargo publish

Benchmarks

Install rust nightly:

rustup install nightly

Run benchmarks:

rustup run nightly cargo bench

Logo courtesy to http://niastudio.net ๐Ÿ‘Œ

mockito's People

Contributors

alyssais avatar andir avatar diggsey avatar estin avatar galaxie avatar ignatenkobrain avatar jean553 avatar kornelski avatar lipanski avatar loyd avatar lucab avatar macisamuele avatar matteosister avatar mikeastock avatar mikrostew avatar otavio avatar repi avatar saks avatar sterlingjensen avatar thomasetter avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.