Class: RailsExtras::RSpec::Formatters::NumericProgress

Inherits:
RSpec::Core::Formatters::BaseTextFormatter
  • Object
show all
Defined in:
lib/rails_extras/rspec/formatters/numeric_progress.rb

Instance Method Summary collapse

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_dumpObject



28
29
30
31
# File 'lib/rails_extras/rspec/formatters/numeric_progress.rb', line 28

def start_dump
  super()
  output.puts
end