Trait assert_cmd::assert::IntoCodePredicate [−][src]
pub trait IntoCodePredicate<P> where
P: Predicate<i32>, { type Predicate; fn into_code(self) -> P; }
Expand description
Used by Assert::code
to convert Self
into the needed
predicates_core::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
Required methods
Implementations on Foreign Types
type Predicate = EqCodePredicate
type Predicate = InCodePredicate
type Predicate = InCodePredicate