class TestUnitCollectorDescendant

Public Instance Methods

setup() click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 5
def setup
  @previous_descendants = Test::Unit::TestCase::DESCENDANTS.dup
  Test::Unit::TestCase::DESCENDANTS.clear
end
teardown() click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 10
def teardown
  Test::Unit::TestCase::DESCENDANTS.replace(@previous_descendants)
end

Private Instance Methods

assert_collect(expected, *collect_args) { |collector| ... } click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 15
def assert_collect(expected, *collect_args)
  collector = Test::Unit::Collector::Descendant.new
  yield(collector) if block_given?
  assert_equal(expected, collector.send(:collect, *collect_args))
end
default_name() click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 21
def default_name
  Test::Unit::Collector::Descendant::NAME
end
empty_suite(name=nil) click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 25
def empty_suite(name=nil)
  Test::Unit::TestSuite.new(name || default_name)
end