class TestUnitPending

Public Instance Methods

test_pend() click to toggle source
# File test-unit-3.3.4/test/test-pending.rb, line 35
def test_pend
  test = nil
  result = _run_test("test_pend") {|t| test = t}
  assert_equal("1 tests, 0 assertions, 0 failures, 0 errors, 1 pendings, " \
               "0 omissions, 0 notifications",
               result.to_s)
  assert_fault_messages(["1st pend"], result.pendings)
  assert_true(test.interrupted?)
end
test_pend_with_failure_in_block() click to toggle source
# File test-unit-3.3.4/test/test-pending.rb, line 45
def test_pend_with_failure_in_block
  test = nil
  result = _run_test("test_pend_with_failure_in_block") {|t| test = t}
  assert_equal("1 tests, 1 assertions, 0 failures, 0 errors, 1 pendings, " \
               "0 omissions, 0 notifications",
               result.to_s)
  assert_fault_messages(["Wait a minute"], result.pendings)
  assert_false(test.interrupted?)
end
test_pend_with_no_failure_in_block() click to toggle source
# File test-unit-3.3.4/test/test-pending.rb, line 55
def test_pend_with_no_failure_in_block
  test = nil
  result = _run_test("test_pend_with_no_failure_in_block") {|t| test = t}
  assert_equal("1 tests, 1 assertions, 1 failures, 0 errors, 0 pendings, " \
               "0 omissions, 0 notifications",
               result.to_s)
  assert_fault_messages(["Pending block should not be passed: Wait a minute."],
                        result.failures)
  assert_true(test.interrupted?)
end

Private Instance Methods

_run_test(name, &block) click to toggle source
Calls superclass method TestUnitTestUtil#_run_test
# File test-unit-3.3.4/test/test-pending.rb, line 67
def _run_test(name, &block)
  super(TestCase, name, &block)
end