public
Last active

A stupid RSpec formatter that prints FFFUUU instead of FFFFF. Heh.

  • Download Gist
README.textile
Textile

FffuuuFormatter

A stupid RSpec formatter that prints FFFUUU instead of FFFFF. Heh.

Installation

Throw it in a file and run your specs like this:

$ rspec -r path/to/fffuuu_formatter.rb -f FffuuuFormatter spec/

If you want to use this as your default formatter, put this into your .rspec file:

-r path/to/fffuuu_formatter.rb
  -f FffuuuFormatter
fffuuu_formatter.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
require 'rspec/core/formatters/progress_formatter'
 
class FffuuuFormatter < RSpec::Core::Formatters::ProgressFormatter
def example_failed(example)
@failed_examples << example
letter = (@example_count / 2 >= @failed_examples.count) ? 'F' : 'U'
output.print red(letter)
end
 
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.