Crate simulacrum [] [src]

Minimal library for creating mock objects by hand using stable Rust.

This crate is a facade that just re-exports any crates necessary to both create and use mock objects in Simulacrum.

Re-exports

pub use simulacrum_macros::*;
pub use simulacrum_mock::*;
pub use simulacrum_user::*;

Macros

create_expect_method

Use this macro to create an .expect_METHOD_NAME() method.

create_mock
create_mock_struct
params

Use this macro to create a Validator that works for methods with 2-9 parameters.

simulacrum_tuplefy
was_called

Use this macro to do a self.e.was_called self.e.was_called_returning with a shorter interface.