类 Test::Unit::Collector::ObjectSpace

常量

NAME

公共类方法

new(source=::ObjectSpace) 点击切换源码
调用超类方法 Test::Unit::Collector::new
# File test-unit-3.6.7/lib/test/unit/collector/objectspace.rb, line 15
def initialize(source=::ObjectSpace)
  super()
  @source = source
end

公共实例方法

collect(name=NAME) 点击切换源码
# File test-unit-3.6.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}
  adjust_ractor_tests(suite)
  suite
end