class Test::Unit::TestTestCase::TestTestDefined::TestCombine::TestDefStyle

Public Instance Methods

test_after() click to toggle source
# File test-unit-3.3.4/test/test-test-case.rb, line 823
def test_after
end
test_before() click to toggle source
# File test-unit-3.3.4/test/test-test-case.rb, line 820
def test_before
end
test_line_after_def() click to toggle source
# File test-unit-3.3.4/test/test-test-case.rb, line 834
def test_line_after_def
  line_after_def = nil
  test_case = Class.new(TestCase) do
    def test_before
    end

    line_after_def = __LINE__; def test_after
    end
  end
  query = {
    :path => __FILE__,
    :line => line_after_def,
    :method_name => "test_before",
  }
  assert_false(test_case.test_defined?(query))
end
test_line_middle() click to toggle source
# File test-unit-3.3.4/test/test-test-case.rb, line 817
def test_line_middle
  line_middle = nil
  test_case = Class.new(TestCase) do
    def test_before
    end
    line_middle = __LINE__
    def test_after
    end
  end
  query = {
    :path => __FILE__,
    :line => line_middle,
    :method_name => "test_before",
  }
  assert_true(test_case.test_defined?(query))
end