Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joakimk/593755 to your computer and use it in GitHub Desktop.
Save joakimk/593755 to your computer and use it in GitHub Desktop.
# 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