Skip to content

Commit

Permalink
Replace some assert_that usage in doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Aug 29, 2018
1 parent 473babc commit 3b25ab3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions tests/testsuite/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: AsRef<OsStr>>(&self, program: T) -> Execs {
let mut p = ::support::process(program);
p.cwd(self.root());
Expand Down
4 changes: 1 addition & 3 deletions tests/testsuite/support/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3b25ab3

Please sign in to comment.