Skip to content

Instantly share code, notes, and snippets.

@natritmeyer
Created April 20, 2011 17:19
Show Gist options
  • Save natritmeyer/932026 to your computer and use it in GitHub Desktop.
Save natritmeyer/932026 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
require "rspec/core/formatters/base_text_formatter"
class ProgressWithNames < RSpec::Core::Formatters::BaseTextFormatter
def example_passed(example)
super(example)
output.print green(". #{example.full_description}\n")
end
def example_pending(example)
super(example)
output.print yellow("* #{example.full_description}\n")
end
def example_failed(example)
super(example)
output.print red("F #{example.full_description}\n")
end
def start_dump
super()
output.puts
end
end
@cmrd-senya
Copy link

rspec --format documentation does the trick for me today

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