Class: RailsExtras::RSpec::Formatters::NumericProgress
- Inherits:
-
RSpec::Core::Formatters::BaseTextFormatter
- Object
- RSpec::Core::Formatters::BaseTextFormatter
- RailsExtras::RSpec::Formatters::NumericProgress
- Defined in:
- lib/rails_extras/rspec/formatters/numeric_progress.rb
Instance Method Summary collapse
- #example_failed(example) ⇒ Object
- #example_passed(example) ⇒ Object
- #example_pending(example) ⇒ Object
-
#initialize(output) ⇒ NumericProgress
constructor
A new instance of NumericProgress.
- #start_dump ⇒ Object
Constructor Details
#initialize(output) ⇒ NumericProgress
Returns a new instance of NumericProgress.
7 8 9 10 |
# File 'lib/rails_extras/rspec/formatters/numeric_progress.rb', line 7 def initialize(output) @start_time = Time.now super(output) end |
Instance Method Details
#example_failed(example) ⇒ Object
22 23 24 25 26 |
# File 'lib/rails_extras/rspec/formatters/numeric_progress.rb', line 22 def example_failed(example) super(example) #output.print failure_color("FAILED: #{example.full_description}\n") print_numeric_progress end |
#example_passed(example) ⇒ Object
12 13 14 15 |
# File 'lib/rails_extras/rspec/formatters/numeric_progress.rb', line 12 def example_passed(example) super(example) print_numeric_progress end |
#example_pending(example) ⇒ Object
17 18 19 20 |
# File 'lib/rails_extras/rspec/formatters/numeric_progress.rb', line 17 def example_pending(example) super(example) print_numeric_progress end |
#start_dump ⇒ Object
28 29 30 31 |
# File 'lib/rails_extras/rspec/formatters/numeric_progress.rb', line 28 def start_dump super() output.puts end |