Sha256: b8875bc2751de9dec398f8c8977399d1be249a5939a112b4d426b28d788a5644

Contents?: true

Size: 748 Bytes

Versions: 32

Compression:

Stored size: 748 Bytes

Contents

require 'fivemat/elapsed_time'

module Minitest
  class FivematReporter < Reporter
    include ElapsedTime

    def initialize(*args)
      super
      @class = nil
    end

    def record(result)
      if @class != result.klass
        if @class
          print_elapsed_time(io, @class_start_time)
          io.print "\n"
        end
        @class = result.klass
        @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

32 entries across 32 versions & 4 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/minitest/fivemat_plugin.rb