diff --git a/tests/testsuite/support/mod.rs b/tests/testsuite/support/mod.rs index c7c54418bae..f2a8e93783e 100644 --- a/tests/testsuite/support/mod.rs +++ b/tests/testsuite/support/mod.rs @@ -367,12 +367,12 @@ impl Project { FileBuilder::new(self.root().join(path), body).mk() } - /// Create a `ProcessBuilder` to run a program in the project. + /// Create a `ProcessBuilder` to run a program in the project + /// and wrap it in an Execs to assert on the execution. /// Example: - /// assert_that( - /// p.process(&p.bin("foo")), - /// execs().with_stdout("bar\n"), - /// ); + /// p.process(&p.bin("foo")) + /// .with_stdout("bar\n") + /// .run(); pub fn process>(&self, program: T) -> Execs { let mut p = ::support::process(program); p.cwd(self.root()); diff --git a/tests/testsuite/support/registry.rs b/tests/testsuite/support/registry.rs index 6cbd57430a8..9ae7212d4b7 100644 --- a/tests/testsuite/support/registry.rs +++ b/tests/testsuite/support/registry.rs @@ -109,9 +109,7 @@ pub fn alt_api_url() -> Url { /// "#) /// .build(); /// -/// assert_that( -/// p.cargo("run"), -/// execs().with_stdout("24")); +/// p.cargo("run").with_stdout("24").run(); /// ``` pub struct Package { name: String,