Sha256: 46feeb372e7debe4582f9bb312c9b53290bdd2a9eacb098b556eaa7363f18f97

Contents?: true

Size: 673 Bytes

Versions: 33

Compression:

Stored size: 673 Bytes

Contents

require 'fivemat/elapsed_time'

module Minitest
  class FivematReporter < Reporter
    include ElapsedTime

    def record(result)
      if @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 @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

33 entries across 32 versions & 11 rubygems

Version Path
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
logstash-output-icinga-1.1.0 vendor/jruby/2.3.0/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/minitest/fivemat_plugin.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/minitest/fivemat_plugin.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/minitest/fivemat_plugin.rb
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/minitest/fivemat_plugin.rb
logstash-filter-csharp-0.1.0 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
fivemat-1.3.5 lib/minitest/fivemat_plugin.rb
fivemat-1.3.4 lib/minitest/fivemat_plugin.rb
logstash-filter-htmlentities-0.1.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
logstash-output-icinga-1.0.0 vendor/jruby/1.9/gems/fivemat-1.3.3/lib/minitest/fivemat_plugin.rb
fivemat-1.3.3 lib/minitest/fivemat_plugin.rb
logstash-filter-zabbix-0.1.2 vendor/bundle/jruby/1.9/gems/fivemat-1.3.2/lib/minitest/fivemat_plugin.rb
logstash-filter-zabbix-0.1.1 vendor/bundle/jruby/1.9/gems/fivemat-1.3.2/lib/minitest/fivemat_plugin.rb
logstash-input-fifo-0.9.1 vendor/bundle/jruby/1.9/gems/fivemat-1.3.2/lib/minitest/fivemat_plugin.rb
logstash-input-fifo-0.9.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.2/lib/minitest/fivemat_plugin.rb
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/fivemat-1.3.2/lib/minitest/fivemat_plugin.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/fivemat-1.3.2/lib/minitest/fivemat_plugin.rb