| Crates.io | workspacer-toml-mock |
| lib.rs | workspacer-toml-mock |
| version | 0.1.2 |
| created_at | 2025-04-01 05:49:09.909673+00 |
| updated_at | 2025-07-13 00:44:49.116302+00 |
| description | A Rust library providing a fully functional mock implementation of CargoTomlInterface, simulating Cargo.toml behaviors for testing. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1614448 |
| size | 172,384 |
workspacer-toml-mockworkspacer-toml-mock is a Rust library providing a fully functional mock implementation of the CargoTomlInterface. This mock is useful for simulating various conditions and behaviors of a Cargo.toml file in Rust projects, facilitating robust testing and development environments without direct file manipulation.
Integrate this crate in scenarios where you require a mock Cargo.toml to test behavior without interacting with the actual files. Utilize the MockCargoToml struct to set desired states and methods to invoke operations like checking file existence or validating integrity.
Example:
let mock = MockCargoToml::fully_valid_config();
assert!(mock.verify_integrity().is_ok());
Implements various traits to mimic actual Cargo.toml interactions:
SaveToDiskUpdateDependencyVersionRawGatherBinTargetNamesThis crate is developed for the Rust 2024 edition.