Class: HtmlWithPassedTime

Inherits:
RSpec::Core::Formatters::HtmlFormatter
  • Object
show all
Defined in:
lib/html_with_passed_time.rb

Overview

This is formatter for ‘rspec` to show end time of each `it`

Instance Method Summary collapse

Instance Method Details

#example_passed(passed) ⇒ Object

Formatter for passed example



11
12
13
14
15
16
17
18
19
# File 'lib/html_with_passed_time.rb', line 11

def example_passed(passed)
  result_data = passed.example.execution_result
  @printer.move_progress(percent_done)
  @printer.print_example_passed("#{passed.example.description} : \
                                Test started at: #{result_data.started_at} \,
                                Test finished at: #{result_data.finished_at}",
                                result_data.run_time.to_s)
  @printer.flush
end