class Test::Unit::TestTestCase::TestTestDefined::TestCombine::TestMethodStyle

Public Instance Methods

test_line_after_method() click to toggle source
# File test-unit-3.3.4/test/test-test-case.rb, line 870
def test_line_after_method
  line_after_method = nil
  test_case = Class.new(TestCase) do
    test "before" do
    end

    line_after_method = __LINE__; test "after" do
    end
  end
  query = {
    :path => __FILE__,
    :line => line_after_method,
    :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 853
def test_line_middle
  line_middle = nil
  test_case = Class.new(TestCase) do
    test "before" do
    end
    line_middle = __LINE__
    test "after" do
    end
  end
  query = {
    :path => __FILE__,
    :line => line_middle,
    :method_name => "test: before",
  }
  assert_true(test_case.test_defined?(query))
end