class TestFaultLocationDetector::TestSourceLocation

Public Instance Methods

setup_check_source_location() click to toggle source
# File test-unit-3.3.4/test/test-fault-location-detector.rb, line 53
def setup_check_source_location
  unless lambda {}.respond_to?(:source_location)
    omit("Need Proc#source_location")
  end
end
test_detected() click to toggle source
# File test-unit-3.3.4/test/test-fault-location-detector.rb, line 59
def test_detected
  target_line_number = nil
  test_case = Class.new(Test::Unit::TestCase) do
    include AlwaysFailAssertion

    test "failed" do
      target_line_number = __LINE__; assert_always_failed
    end
  end

  fault = run_test_case(test_case)
  assert_detect(fault, target_line_number)
end