assert_cmd
assert_cmd copied to clipboard
Assert#dump()
Would be nice to have a new method dump():
assert_cmd::Command::cargo_bin("foo")
.unwrap()
.current_dir(tmp.path())
.arg("--verbose")
.arg("bar")
.assert()
.dump() // here!
.success();
It should print the entire stdout and stderr to console. This would be very convenient for debugging purposes.
I'm ok with someone implementing that. We would need to decide on the name first.
Might seem odd but I'd like a name that also works for snapbox so I can carry this change forward to that crate as well. I worry dump might be taken to mean "dump to disk" (like SNAPSHOTS=dump.
Some name ideas
-
dbg -
print -
log
@yegor256 I like print, since it's the closest to println! we usually use to print something temporary to console