-
-
Save nuc/1370772 to your computer and use it in GitHub Desktop.
An rspec formatter that prints each test name and result to the console on a new line - hudson likes it
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/base_text_formatter" | |
class ProgressWithNames < RSpec::Core::Formatters::BaseTextFormatter | |
def example_passed(example) | |
super(example) | |
output.print green(".") | |
end | |
def example_pending(example) | |
super(example) | |
output.print yellow(".") | |
end | |
def example_failed(example) | |
super(example) | |
output.print red("\n#{example.full_description}\n") | |
output.print red(" #{example.example_group.metadata[:example_group][:file_path].gsub(/.*?\/spec\//, '') + ":" + example.example_group.metadata[:example_group][:line_number].to_s}\n") | |
end | |
def start_dump | |
super() | |
output.puts | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment