Skip to content

Instantly share code, notes, and snippets.

@rick
Created May 12, 2012 22:30
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 rick/2669497 to your computer and use it in GitHub Desktop.
Save rick/2669497 to your computer and use it in GitHub Desktop.
nescafe formatter for rspec 2.*
require 'rspec/core/formatters/progress_formatter'
class NescafeFormatter < RSpec::Core::Formatters::ProgressFormatter
def example_failed(example)
super
index = failed_examples.size - 1
output.puts "\n"
dump_failure(example, index)
dump_backtrace(example)
output.puts "\n"
end
end
bungle exec rspec --require ./spec/support/formatters/nescafe_formatter.rb -f NescafeFormatter spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment