| 1 |
require 'spec/runner/formatter/base_text_formatter' |
| 2 |
|
| 3 |
module Spec |
| 4 |
module Runner |
| 5 |
module Formatter |
| 6 |
class ProgressBarFormatter < BaseTextFormatter |
| 7 |
def example_failed(example, counter, failure) |
| 8 |
@output.print colourise('F', failure) |
| 9 |
@output.flush |
| 10 |
end |
| 11 |
|
| 12 |
def example_passed(example) |
| 13 |
@output.print green('.') |
| 14 |
@output.flush |
| 15 |
end |
| 16 |
|
| 17 |
def example_pending(example, message) |
| 18 |
super |
| 19 |
@output.print yellow('P') |
| 20 |
@output.flush |
| 21 |
end |
| 22 |
|
| 23 |
def start_dump |
| 24 |
@output.puts |
| 25 |
@output.flush |
| 26 |
end |
| 27 |
|
| 28 |
def method_missing(sym, *args) |
| 29 |
|
| 30 |
end |
| 31 |
end |
| 32 |
end |
| 33 |
end |
| 34 |
end |