Forked from denro/failures_during_run_formatter.rb
Created
September 23, 2010 14:59
-
-
Save joakimk/593755 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# http://gist.github.com/gists/593755 (fork of http://gist.github.com/485785) | |
require 'spec/runner/formatter/progress_bar_formatter' | |
class FailuresDuringRunFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
def example_failed(example, counter, failure) | |
super # show the 'F' in progress | |
dump_failure(counter, failure) | |
end | |
end | |
class Spec::Runner::Reporter | |
def dump | |
# No error messages after run as we print the errors as they occur | |
# Newline and summary | |
puts | |
formatters.each do |f| | |
f.dump_summary(duration, @example_count, @failures.length, @pending_count) | |
f.close | |
end | |
@failures.length | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment