Skip to content

Instantly share code, notes, and snippets.

@robustdj
Created May 1, 2012 21:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robustdj/2571615 to your computer and use it in GitHub Desktop.
Save robustdj/2571615 to your computer and use it in GitHub Desktop.
RSpec Formatter Documentation with instant stack traces upon failure
--colour
--backtrace
--require ./spec/support/documentation_instafail_formatter.rb
--format DocumentationInstafail
require 'rspec/core/formatters/documentation_formatter'
require 'rspec/instafail'
class DocumentationInstafail < RSpec::Core::Formatters::DocumentationFormatter
def example_failed(example)
super(example)
instafail.example_failed(example)
end
def instafail
@instafail ||= RSpec::Instafail.new(output)
end
end
@jaredatron
Copy link

This is awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment