Sha256: adac740e986481bd665a5b54050f1de48a7414265eedaaeb7808bec7e71f2715

Contents?: true

Size: 647 Bytes

Versions: 6

Compression:

Stored size: 647 Bytes

Contents

module Screw
  module Unit
    module Collector
      class ObjectSpace
        include Collector
        
        NAME = 'collected from the ObjectSpace'
        
        def initialize(source=::ObjectSpace)
          super()
          @source = source
        end
        
        def collect(name=NAME)
          suite = TestSuite.new(name)
          sub_suites = []
          @source.each_object(Class) do |klass|
            if(Screw::Unit::TestCase > klass)
              add_suite(sub_suites, klass.suite)
            end
          end
          sort(sub_suites).each{|s| suite << s}
          suite
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
treetop-1.1.0 test/screw/unit/collector/objectspace.rb
treetop-1.0.1 test/screw/unit/collector/objectspace.rb
treetop-1.0.0 test/screw/unit/collector/objectspace.rb
treetop-1.0.2 test/screw/unit/collector/objectspace.rb
treetop-1.1.1 test/screw/unit/collector/objectspace.rb
treetop-1.1.2 test/screw/unit/collector/objectspace.rb