In Files

  • test-unit-3.3.7/lib/test/unit/collector/objectspace.rb

Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Test::Unit::Collector::ObjectSpace

Constants

NAME

Public Class Methods

new(source=::ObjectSpace) click to toggle source
 
               # File test-unit-3.3.7/lib/test/unit/collector/objectspace.rb, line 15
def initialize(source=::ObjectSpace)
  super()
  @source = source
end
            

Public Instance Methods

collect(name=NAME) click to toggle source
 
               # File test-unit-3.3.7/lib/test/unit/collector/objectspace.rb, line 20
def collect(name=NAME)
  suite = TestSuite.new(name)
  sub_suites = []
  @source.each_object(Class) do |klass|
    if(Test::Unit::TestCase > klass)
      add_suite(sub_suites, klass.suite)
    end
  end
  sort(sub_suites).each{|s| suite << s}
  suite
end