]> git.proxmox.com Git - cargo.git/commitdiff
Replace some assert_that usage in doc comments
authorDale Wijnand <dale.wijnand@gmail.com>
Wed, 29 Aug 2018 06:37:21 +0000 (08:37 +0200)
committerDale Wijnand <dale.wijnand@gmail.com>
Wed, 29 Aug 2018 08:26:12 +0000 (10:26 +0200)
tests/testsuite/support/mod.rs
tests/testsuite/support/registry.rs

index c7c54418bae80415de1e585cf4fa067d040ef316..f2a8e93783e8ccd3f3d77f60bb3025adcbc151dc 100644 (file)
@@ -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());
index 6cbd57430a8ba2a826271e2b1458c51e97b319dc..9ae7212d4b70e0dd85d8bccc4added8cee0132a0 100644 (file)
@@ -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,