Module assert

Source
Available on crate feature assert only.
Expand description

Filesystem assertions.

See PathAssert.

§Examples

use camino_tempfile_ext::prelude::*;
use predicates::prelude::*;

let temp = Utf8TempDir::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();

Structs§

BytesContentPathPredicate
Adapter used by IntoUtf8PathPredicate for static byte slices.
PathPredicate
Adapter used by IntoUtf8PathPredicate for Predicate<Path> instances, such as those in [predicates::path].
StrContentPathPredicate
Adapter used by IntoUtf8PathPredicate for str and String.
StrPathPredicate
Adapter used by IntoUtf8PathPredicate for Predicate<str> instances, such as those in [predicates::str].

Traits§

IntoUtf8PathPredicate
Converts a type into the needed [Predicate<Utf8Path>].
PathAssert
Assert the state of files within a Utf8TempDir.