Flowdock
method

_run_suite

Importance_0
v1_9_3_392 - Show latest stable - 0 notes - Class: Unit
_run_suite(suite, type) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/minitest/unit.rb, line 773
    def _run_suite suite, type
      header = "#{type}_suite_header"
      puts send(header, suite) if respond_to? header

      filter = options[:filter] || '/./'
      filter = Regexp.new $1 if filter =~ /\/(.*)\//

      assertions = suite.send("#{type}_methods").grep(filter).map { |method|
        inst = suite.new method
        inst._assertions = 0

        print "#{suite}##{method} = " if @verbose

        @start_time = Time.now
        result = inst.run self
        time = Time.now - @start_time

        print "%.2f s = " % time if @verbose
        print result
        puts if @verbose

        inst._assertions
      }

      return assertions.size, assertions.inject(0) { |sum, n| sum + n }
    end
Register or log in to add new notes.