use assert_cmd::prelude::*; // Add methods on commands use predicates::prelude::*; // Used for writing assertions use std::process::Command; // Run programs #[test] pub fn it_adds_two() { assert_eq!(4, 2 + 2); } #[test] fn arg_parsing() -> Result<(), Box> { let mut cmd = Command::cargo_bin("lola")?; cmd.arg("pytest"); cmd.assert().stdout(predicate::str::contains("pytest")); Ok(()) }