Projects
View on GitHub
CodeSandwich/Mocktopus
About
Mocking framework for Rust
Developer ToolsMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
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());
}
Explore related projects
Loading…