class TestUnitCollectorDescendant::TestModule

Public Class Methods

name() click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 154
def name
  "Parent"
end

Public Instance Methods

test_in_module() click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 148
def test_in_module
end
test_included_in_child() click to toggle source
# File test-unit-3.3.4/test/collector/test-descendant.rb, line 146
def test_included_in_child
  tests = Module.new do
    def test_in_module
    end
  end

  parent_test_case = Class.new(Test::Unit::TestCase) do
    class << self
      def name
        "Parent"
      end
    end
  end

  child_test_case = Class.new(parent_test_case) do
    include tests

    class << self
      def name
        "Child"
      end
    end
  end

  child_suite = Test::Unit::TestSuite.new(child_test_case.name)
  child_suite << child_test_case.new("test_in_module")

  parent_suite = Test::Unit::TestSuite.new(parent_test_case.name)
  parent_suite << child_suite

  suite = empty_suite("all")
  suite << parent_suite

  assert_collect(suite, "all")
end