From 2310fb9d810f11681c1eecdb88518c23c8b379cf Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Mon, 28 Sep 2015 20:27:30 +0200 Subject: Add fail fast to test runner. Passing `--fail-fast` to the test runner will now abort the test run on the first failure. The run continues on any unexpected errors. --- railties/CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'railties/CHANGELOG.md') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 36ac0951ca..80ef1af7b5 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -1,3 +1,35 @@ +* Add fail fast to `bin/rails test` + + Adding `--fail-fast` or `-f` when running tests will interrupt the run on + the first failure: + + ``` + # Running: + + ................................................S......E + + ArgumentError: Wups! Bet you didn't expect this! + test/models/bunny_test.rb:19:in `block in ' + + bin/rails test test/models/bunny_test.rb:18 + + ....................................F + + This failed + + bin/rails test test/models/bunny_test.rb:14 + + Interrupted. Exiting... + + + Finished in 0.051427s, 1808.3872 runs/s, 1769.4972 assertions/s. + + ``` + + Note that any unexpected errors don't abort the run. + + *Kasper Timm Hansen* + * Add inline output to `bin/rails test` Any failures or errors (and skips if running in verbose mode) are output -- cgit v1.2.3