| Crates.io | workspacer-workspace-mock |
| lib.rs | workspacer-workspace-mock |
| version | 0.1.2 |
| created_at | 2025-04-01 06:11:33.208906+00 |
| updated_at | 2025-07-13 00:49:36.755022+00 |
| description | A flexible mock framework to simulate and test Rust workspace environments, supporting various configurations for testing. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1614453 |
| size | 170,452 |
workspacer-workspace-mock provides a fully configurable mock framework tailored for simulating and testing Rust workspace environments. This crate is ideal for developers needing to replicate various workspace scenarios — from valid setups to specific error states — without the need for actual file system deployment.
MockWorkspace structure, like missing Cargo.toml files or simulating a non-workspace scenario.AsyncMutex.Begin by constructing a MockWorkspace using the fully_valid_config method for a comprehensive setup that simulates a realistic workspace under controlled parameters.
use workspacer_workspace_mock::MockWorkspace;
let mock_workspace = MockWorkspace::fully_valid_config();
mock_workspace.register_in_global().await;
Harness additional methods like find_crate_by_name and validate_integrity to further manipulate and interrogate your mock environment.
The structure supports numerous combinations and offers flexible controls for edge-case testing.
simulate_missing_cargo_toml to guide the simulated environment's behavior.CrateHandleInterface to customize gone crate interactions.This crate is designed for the Rust 2024 edition, ensuring compatibility with the latest language advancements.
Contributions are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.