Created
May 1, 2012 21:35
-
-
Save robustdj/2571615 to your computer and use it in GitHub Desktop.
RSpec Formatter Documentation with instant stack traces upon failure
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
--colour | |
--backtrace | |
--require ./spec/support/documentation_instafail_formatter.rb | |
--format DocumentationInstafail |
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 '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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is awesome, thank you!