Function assert_cmd::cargo::cargo_example_path [−][src]
pub fn cargo_example_path<S: AsRef<OsStr>>(
name: S
) -> Result<PathBuf, CargoError>
Deprecated since 0.9.1
: For caching, using escargot directly.
Get the path to the specified example of the current crate.
Intended for caching the location, reducing the cargo overhead.
Examples
use assert_cmd::prelude::*; use std::process::Command; let bin_under_test = assert_cmd::cargo::cargo_example_path("example_fixture").unwrap(); Command::new(&bin_under_test) .unwrap();