Crates.io | mockable |
lib.rs | mockable |
version | 3.0.0 |
source | src |
created_at | 2023-09-20 19:41:50.847531 |
updated_at | 2024-03-22 12:17:40.001867 |
description | Usefull components to make easier to mock your code |
homepage | |
repository | |
max_upload_size | |
id | 978438 |
size | 105,537 |
This crate provides usefull traits to make easier to mock your code using mockall
crate.
Add this to your Cargo.toml
:
[dependencies]
mockable = { version = "2", features = [ ... ] }
[dev-dependencies]
mockable = { version = "2", features = ["mock"] }
The Clock
trait provides a way to mock the current time.
Note: This trait is only available when the clock
feature is enabled.
The CommandRunner
trait provides a way to mock the execution of commands.
Note: This trait is only available when the cmd
feature is enabled.
The Env
trait provides a way to mock the environment variables.
The HttpServer
trait provides a way to mock a HTTP server.
Note: This trait is only available when the http
feature is enabled.
The Mock
trait provides a way to mock a function.
The System
trait provides a way to mock the system.
The UuidGenerator
trait provides a way to mock the UUID generator.
Note: This trait is only available when the uuid
feature is enabled.