Function predicates::prelude::predicate::path::eq_file[][src]

pub fn eq_file<P: Into<PathBuf>>(path: P) -> BinaryFilePredicate

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