Crates.io | assert_fs |
lib.rs | assert_fs |
version | 1.1.2 |
source | src |
created_at | 2018-05-28 11:20:10.287678 |
updated_at | 2024-07-25 13:33:56.931623 |
description | Filesystem fixtures and assertions for testing. |
homepage | https://github.com/assert-rs/assert_fs |
repository | https://github.com/assert-rs/assert_fs.git |
max_upload_size | |
id | 67443 |
size | 81,587 |
Assert Filesystems - Filesystem fixtures and assertions for testing.
assert_fs
aims to simplify
Here is a trivial example:
use assert_fs::prelude::*;
use predicates::prelude::*;
let temp = assert_fs::TempDir::new().unwrap();
let input_file = temp.child("foo.txt");
input_file.touch().unwrap();
// ... do something with input_file ...
input_file.assert("");
temp.child("bar.txt").assert(predicate::path::missing());
temp.close().unwrap();
See the documentation for more information.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.