Function mockall::predicate::path::eq_file

source ·
pub fn eq_file<P>(path: P) -> BinaryFilePredicate
where P: Into<PathBuf>,
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")));