rake task does not exit with failures #26
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
when there are test failures, the rake task should terminiate with errors to fail continuous integration tasks. This is inline with RSpec and other testing tools.
This is easily reproducible by chaining rake commands. ex:
rake jasmine:headless myapp:somecommand
example output:
PASS: 0 tests, 0 failures, 0 secs.
..........F............
myApp.js Expected 'post' to equal 'delete'.
FAIL: 23 tests, 1 failures, 0.237 secs.
Output from somecommand fired here...
Having not really chained Rake tasks like that on a regular basis, will
exit
ing with the right status code on failure be sufficient to get the right behavior?i believe all you need to do is raise an exception from within the task and rake will properly set the exit code. this is how the rspec rake task works:
https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/rake_task.rb