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

Commit 95be0f1

Browse files
author
Daan Sprenkels
committed
Add note to ignore_status about existing asserts
Namely, it removes any assertions that were previously made.
1 parent 4de8e96 commit 95be0f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/assert.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ impl Assert {
240240

241241
/// Do not care whether the command exits successfully or if it fails.
242242
///
243+
/// This function removes any assertions that were already set, including
244+
/// any expected exit code that was set with [`fails_with`].
245+
///
243246
/// # Examples
244247
///
245248
/// ```rust
@@ -251,6 +254,8 @@ impl Assert {
251254
/// .stderr().is("cat: non-existing-file: No such file or directory")
252255
/// .unwrap();
253256
/// ```
257+
///
258+
/// [`fails_with`]: #method.fails_with
254259
pub fn ignore_status(mut self) -> Self {
255260
self.expect_exit_code = None;
256261
self.expect_success = None;

0 commit comments

Comments
 (0)