#filesystem #test #assert #fixture

dev assert_fs

Filesystem fixtures and assertions for testing

15 unstable releases (7 breaking)

✓ Uses Rust 2018 edition

0.13.1 Dec 1, 2019
0.13.0 Nov 29, 2019
0.12.0 Nov 29, 2019
0.11.3 Jan 29, 2019
0.3.0 Jun 27, 2018

#11 in Testing

Download history 469/week @ 2019-08-18 253/week @ 2019-08-25 809/week @ 2019-09-01 250/week @ 2019-09-08 405/week @ 2019-09-15 375/week @ 2019-09-22 483/week @ 2019-09-29 400/week @ 2019-10-06 833/week @ 2019-10-13 1052/week @ 2019-10-20 1146/week @ 2019-10-27 756/week @ 2019-11-03 677/week @ 2019-11-10 949/week @ 2019-11-17 1198/week @ 2019-11-24

2,950 downloads per month
Used in 21 crates

MIT/Apache

46KB
684 lines

assert_fs

Assert Filesystems - Filesystem fixtures and assertions for testing.

Build Status Documentation License Crates Status

Install

Add to your Cargo.toml:

[dependencies]
assert_fs = "0.11"

Example

Here is a trivial example:

extern crate assert_fs;
extern crate predicates;

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();

License

Licensed under either of

at your option.

Contribution

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.

Dependencies

~4MB
~86K SLoC