Sha256: 297d727baff32c1e557593a9f40e9616254aa63924c449ac42602b31c85b64b0

Contents?: true

Size: 702 Bytes

Versions: 3

Compression:

Stored size: 702 Bytes

Contents

require 'fivemat/elapsed_time'

module Minitest
  class FivematReporter < Reporter
    include ElapsedTime

    def record(result)
      if defined?(@class) && @class != result.class
        if @class
          print_elapsed_time(io, @class_start_time)
          io.print "\n"
        end
        @class = result.class
        @class_start_time = Time.now
        io.print "#@class "
      end
    end

    def report
      super
      print_elapsed_time(io, @class_start_time) if defined? @class_start_time
    end
  end

  def self.plugin_fivemat_init(options)
    if reporter.kind_of?(CompositeReporter)
      reporter.reporters.unshift(FivematReporter.new(options[:io], options))
    end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
logstash-filter-device_detection-1.0.7-java vendor/bundle/jruby/1.9/gems/fivemat-1.3.6/lib/minitest/fivemat_plugin.rb
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/fivemat-1.3.6/lib/minitest/fivemat_plugin.rb
fivemat-1.3.6 lib/minitest/fivemat_plugin.rb