Function predicates::path::eq_file

source ·
pub fn eq_file<P: Into<PathBuf>>(path: P) -> BinaryFilePredicate
Expand description

Creates a new Predicate that ensures complete equality

Examples

use std::path::Path;
use predicates::prelude::*;

let predicate_file = predicate::path::eq_file(Path::new("Cargo.toml"));
assert_eq!(true, predicate_file.eval(Path::new("Cargo.toml")));
assert_eq!(false, predicate_file.eval(Path::new("src")));
assert_eq!(false, predicate_file.eval(Path::new("src")));