Created
March 18, 2012 09:55
-
-
Save kmckelvin/2070250 to your computer and use it in GitHub Desktop.
RSpec formatter with timed outputs
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' | |
class TimedFormatter < RSpec::Core::Formatters::DocumentationFormatter | |
def example_passed(example) | |
output.puts "#{passed_output(example)} - #{example.execution_result[:run_time]}" | |
end | |
def example_failed(example) | |
output.puts "#{failure_output(example, example.execution_result[:exception])} - #{example.execution_result[:run_time]}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment