Sha256: 7f8b09e556fc121305617c31c34cea47d9a9794d7418f2edb2d17cacee39a342

Contents?: true

Size: 834 Bytes

Versions: 70

Compression:

Stored size: 834 Bytes

Contents

require 'minitest/unit'
require 'fivemat/elapsed_time'

module Fivemat
  module MiniTest
    class Unit < ::MiniTest::Unit
      include ElapsedTime

      def _run_suites(suites, type)
        offset = 0
        suites.reject do |suite|
          filter = options[:filter] || '/./'
          filter = Regexp.new $1 if filter =~ /\/(.*)\//
          suite.send("#{type}_methods").grep(filter).empty?
        end.map do |suite|
          print "#{suite} "
          start_time = Time.now
          result = _run_suite suite, type
          print_elapsed_time $stdout, start_time
          puts
          report.each_with_index do |msg, i|
            puts "%3d) %s" % [offset + i + 1, msg.gsub(/\n/, "\n  ")]
          end
          offset += report.size
          report.clear
          result
        end
      end
    end
  end
end

Version data entries

70 entries across 67 versions & 15 rubygems

Version Path
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/fivemat-1.3.2/lib/fivemat/minitest/unit.rb
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/fivemat-1.3.2/lib/fivemat/minitest/unit.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.2/lib/fivemat/minitest/unit.rb
logstash-filter-base64-1.0.1 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.2/lib/fivemat/minitest/unit.rb
logstash-filter-base64-1.0.0 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.2/lib/fivemat/minitest/unit.rb
fivemat-1.3.2 lib/fivemat/minitest/unit.rb
fivemat-1.3.1 lib/fivemat/minitest/unit.rb
fivemat-1.3.0 lib/fivemat/minitest/unit.rb
fivemat-1.2.1 lib/fivemat/minitest/unit.rb
fivemat-1.2.0 lib/fivemat/minitest/unit.rb