rake task does not exit with failures #26

Closed
opened 2011-06-27 23:09:55 +00:00 by wireframe · 2 comments
wireframe commented 2011-06-27 23:09:55 +00:00 (Migrated from github.com)

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...

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...
johnbintz commented 2011-06-28 14:34:17 +00:00 (Migrated from github.com)

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?

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?
wireframe commented 2011-06-28 14:58:24 +00:00 (Migrated from github.com)

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

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
Sign in to join this conversation.
No Label
bug
doc
feature
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/jasmine-headless-webkit#26
No description provided.