Sha256: 43a1b1724c805b4337d09714fd96cdf561ceaa867d7ae0a5b2fd09994fdcd379

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 Bytes

Contents

require 'rspec/core'
require_relative 'rspec_passed_time_formatter/version'

# This is formatter for `rspec` to show end time of each `it`
class HtmlWithPassedTime < RSpec::Core::Formatters::HtmlFormatter
  RSpec::Core::Formatters.register self, :example_passed

  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec_passed_time_formatter-0.1.0 lib/html_with_passed_time.rb