[−][src]Trait assert_cmd::assert::IntoCodePredicate
Used by Assert::code
to convert Self
into the needed
Predicate<i32>
.
Examples
use assert_cmd::prelude::*; use std::process::Command; use predicates::prelude::*; Command::cargo_bin("bin_fixture") .unwrap() .env("exit", "42") .assert() .code(predicate::eq(42)); // which can be shortened to: Command::cargo_bin("bin_fixture") .unwrap() .env("exit", "42") .assert() .code(42);
Associated Types
type Predicate
The type of the predicate being returned.
Required methods
fn into_code(self) -> P
Convert to a predicate for testing a program's exit code.