Description
#84 brought a valid topic that using run()
did not allow you to see if the Cucumber tests fail. The output of this ticket was new run_and_exit()
method - which, unlike run()
, will make your executable panic and exit with non-zero code.
However, the Book - together with Docs.rs and Readme - never mentions that .run()
still has this behavior and that you can avoid it. The Book is still using the new method, but a-matter-of-fact'ly - some snippets just call .run_and_exit()
instead of .run()
without drawing any attention to it. This has led me to quite a surprise today when I noticed that my automation was not picking up some failures in Cucumber tests, since the executable using .run()
was always exiting with 0, and so the cargo test
command never failed technically 🙂
My suggestion would be to
- either simply mass-replace every use of
.run(
with.run_and_exit(
; - or at least have a plaque right in Quickstart part of the Book, stating the difference between the two, if
.run()
is considered to be of some value.