Skip to content

rake task does not exit with failures #26

wireframe opened this Issue Jun 27, 2011 · 2 comments

2 participants


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.

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 exiting 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:

@johnbintz johnbintz closed this Jul 6, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.