Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Commit 204d0a8

Browse files
committed
docs: Demo and and succeeds
Fixes #60
1 parent 1f4ea6f commit 204d0a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/assert.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@ impl Assert {
175175
/// ```rust
176176
/// extern crate assert_cli;
177177
///
178-
/// assert_cli::Assert::command(&["echo", "42"])
179-
/// .stdout().contains("42")
178+
/// assert_cli::Assert::command(&["cat", "non-existing-file"])
179+
/// .fails()
180+
/// .and()
181+
/// .stderr().contains("non-existing-file")
180182
/// .unwrap();
181183
/// ```
182184
pub fn and(self) -> Self {
@@ -191,6 +193,7 @@ impl Assert {
191193
/// extern crate assert_cli;
192194
///
193195
/// assert_cli::Assert::command(&["echo", "42"])
196+
/// .succeeds()
194197
/// .unwrap();
195198
/// ```
196199
pub fn succeeds(mut self) -> Self {

0 commit comments

Comments
 (0)