16 releases (1 stable)
✓ Uses Rust 2018 edition
|new 1.0.0||Mar 27, 2020|
|0.13.1||Dec 1, 2019|
|0.13.0||Nov 29, 2019|
|0.11.3||Jan 29, 2019|
|0.3.0||Jun 27, 2018|
#49 in Testing
3,683 downloads per month
Used in 27 crates
Assert Filesystems - Filesystem fixtures and assertions for testing.
assert_fs aims to simplify
- Setting up files for your tests to consume
- Asserting on files produced by your tests
Add to your
[dependencies] assert_fs = "1.0.0"
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
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.