Created
August 27, 2010 17:02
-
-
Save timbertson/553733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec/runner/formatter/specdoc_formatter' | |
#monkey-patch the specdoc formatter to immediately print failure messages (and continue) | |
module Spec | |
module Runner | |
module Formatter | |
class SpecdocFormatter | |
alias :example_failed_without_immediate_feedback :example_failed | |
def example_failed(example, counter, failure) | |
example_failed_without_immediate_feedback(example, counter, failure) | |
dump_failure(counter, failure) # dump stacktrace immediately | |
output.flush | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment