Skip to content

Instantly share code, notes, and snippets.

@spllr
Created February 28, 2011 10:02
Show Gist options
  • Save spllr/847151 to your computer and use it in GitHub Desktop.
Save spllr/847151 to your computer and use it in GitHub Desktop.
Break build when test fail
module Bacon
def self.context_did_finish(context)
handle_specification_end
Counter[:context_depth] -= 1
if (@current_context_index + 1) < @contexts.size
@current_context_index += 1
run
else
# DONE
handle_summary
exit(Counter.values_at(:failed, :errors).inject(&:+))
end
end
end
Bacon.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment