Created
March 2, 2011 23:37
-
-
Save jsl/852009 to your computer and use it in GitHub Desktop.
Untested
Untested
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/base_text_formatter' | |
require 'spec/runner/formatter/no_op_method_missing' | |
module Spec | |
module Runner | |
module Formatter | |
class ImmediateFailureFormatter < BaseTextFormatter | |
include NOOPMethodMissing | |
def example_failed(example, counter, failure) | |
@output.print colorize_failure('F', failure) | |
@output.print format_backtrace(failure.exception.backtrace) | |
@output.flush | |
end | |
def example_passed(example) | |
@output.print green('.') | |
@output.flush | |
end | |
def example_pending(example, message, deprecated_pending_location=nil) | |
super | |
@output.print yellow('*') | |
@output.flush | |
end | |
def start_dump | |
@output.puts | |
@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