Class: Test::Unit::Collector::ObjectSpace
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
::Test::Unit::Collector
|
|
Inherits: | Object |
Defined in: | lib/test/unit/collector/objectspace.rb |
Constant Summary
-
NAME =
# File 'lib/test/unit/collector/objectspace.rb', line 13'collected from the ObjectSpace'
Class Method Summary
- .new(source = ::ObjectSpace) ⇒ ObjectSpace constructor
Instance Attribute Summary
::Test::Unit::Collector
- Included
Instance Method Summary
::Test::Unit::Collector
- Included
Constructor Details
.new(source = ::ObjectSpace) ⇒ ObjectSpace
# File 'lib/test/unit/collector/objectspace.rb', line 15
def initialize(source=::ObjectSpace) super() @source = source end
Instance Method Details
#collect(name = NAME)
[ GitHub ]# File '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