-
-
Save jschairb/86449 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # this goes in the $HOME dir | |
| # needs mislav-rspactor v0.3.2 and RSpec 1.2 | |
| Rspactor::Runner.class_eval do | |
| class << self | |
| alias old_formatter_opts formatter_opts | |
| def formatter_opts | |
| # update this path to where you saved unicode_formatter.rb | |
| old_formatter_opts + " -r /Users/mislav/Projects/unicode_formatter -f UnicodeFormatter" | |
| end | |
| end | |
| end |
This file contains hidden or 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, pending_caller) | |
| super | |
| @output.print yellow('● ') | |
| @output.flush | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
