All Projects → CodeSandwich → Mocktopus

CodeSandwich / Mocktopus

Licence: mit
Mocking framework for Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Mocktopus

Nsubstitute
A friendly substitute for .NET mocking libraries.
Stars: ✭ 1,646 (+819.55%)
Mutual labels:  test, testing-tools, mock, mocking
laika
Log, test, intercept and modify Apollo Client's operations
Stars: ✭ 99 (-44.69%)
Mutual labels:  mock, test, mocking, testing-tools
Prig
Prig is a lightweight framework for test indirections in .NET Framework.
Stars: ✭ 106 (-40.78%)
Mutual labels:  test, testing-tools, mock, mocking
umock-c
A pure C mocking library
Stars: ✭ 29 (-83.8%)
Mutual labels:  mock, unit-testing, mocking
mockingbird
🐦 Decorator Powered TypeScript Library for Creating Mocks
Stars: ✭ 70 (-60.89%)
Mutual labels:  mock, test, mocking
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-77.09%)
Mutual labels:  unit-testing, test, testing-tools
Retromock
Java library for mocking responses in a Retrofit service.
Stars: ✭ 48 (-73.18%)
Mutual labels:  mock, mocking, testing-tools
automock
A library for testing classes with auto mocking capabilities using jest-mock-extended
Stars: ✭ 26 (-85.47%)
Mutual labels:  mock, unit-testing, mocking
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging 🤗
Stars: ✭ 20 (-88.83%)
Mutual labels:  unit-testing, test, testing-tools
Hippolyte
HTTP Stubbing in Swift
Stars: ✭ 109 (-39.11%)
Mutual labels:  mock, test, mocking
Cuckoo
Boilerplate-free mocking framework for Swift!
Stars: ✭ 1,344 (+650.84%)
Mutual labels:  unit-testing, mock, mocking
Sinon Jest Cheatsheet
Some examples on how to achieve the same goal with either of both libraries: sinon and jest. Also some of those goals achievable only by one of these tools.
Stars: ✭ 226 (+26.26%)
Mutual labels:  unit-testing, mock, mocking
Mimic
Seamless client side mocking
Stars: ✭ 380 (+112.29%)
Mutual labels:  test, mock, mocking
Unit Threaded
Advanced unit test framework for D
Stars: ✭ 100 (-44.13%)
Mutual labels:  unit-testing, mock, mocking
Firebase Mock
Firebase mock library for writing unit tests
Stars: ✭ 319 (+78.21%)
Mutual labels:  unit-testing, mock, mocking
Mockito
Most popular Mocking framework for unit tests written in Java
Stars: ✭ 12,453 (+6856.98%)
Mutual labels:  testing-tools, mock, mocking
Httpretty
Intercept HTTP requests at the Python socket level. Fakes the whole socket module
Stars: ✭ 1,930 (+978.21%)
Mutual labels:  testing-tools, mock, mocking
Acutest
Simple header-only C/C++ unit testing facility.
Stars: ✭ 170 (-5.03%)
Mutual labels:  testing-tools, unit-testing
Ava Playback
📼 🚀 Record and playback http requests from your ava tests
Stars: ✭ 124 (-30.73%)
Mutual labels:  testing-tools, mock
Hoverfly Java
Java binding for Hoverfly
Stars: ✭ 130 (-27.37%)
Mutual labels:  testing-tools, mocking

Crates.io Docs.rs Build Status

logo

Mocking framework for Rust (currently only nightly). See documentation for more.

#[mockable]
mod hello_world {
    pub fn world() -> &'static str {
        "world"
    }

    pub fn hello_world() -> String {
        format!("Hello {}!", world())
    }
}

#[test]
fn mock_test() {
    hello_world::world.mock_safe(|| MockResult::Return("mocking"));

    assert_eq!("Hello mocking!", hello_world::hello_world());
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].