stole this off a blog post somewhere, i forget. makes your rake spec output like 900 times more PIMP.
Created
May 31, 2010 10:04
-
-
Save nclark/419709 to your computer and use it in GitHub Desktop.
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 | |
--format UnicodeFormatter | |
--loadby mtime | |
--reverse |
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
# Unicode formatter for RSpec console output | |
require 'spec/runner/formatter/base_text_formatter' | |
class UnicodeFormatter < Spec::Runner::Formatter::BaseTextFormatter | |
def example_failed(example, counter, failure) | |
@output.print colorize_failure('✗ ', failure) | |
@output.flush | |
end | |
def example_passed(example) | |
@output.print green('✓ ') | |
@output.flush | |
end | |
def example_pending(example, message) | |
super | |
@output.print yellow('● ') | |
@output.flush | |
end | |
def start_dump | |
@output.puts | |
@output.flush | |
end | |
def method_missing(sym, *args) | |
# ignore | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment