Created
          April 20, 2011 17:19 
        
      - 
      
- 
        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
  
        
  
    
      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
    
  
  
    
  | 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 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
rspec --format documentationdoes the trick for me today