class TestUnitOmission::TestCase

Public Class Methods

suite() click to toggle source
# File test-unit-3.3.4/test/test-omission.rb, line 9
def suite
  Test::Unit::TestSuite.new(name)
end

Public Instance Methods

test_omit() click to toggle source
# File test-unit-3.3.4/test/test-omission.rb, line 14
def test_omit
  omit("1st omit")
  omit("2nd omit. Should not be reached here.")
  assert(true, "Should not be reached here too.")
end
test_omit_with_block() click to toggle source
# File test-unit-3.3.4/test/test-omission.rb, line 27
def test_omit_with_block
  omit("Omit block") do
    flunk("Should not be reached here.")
  end
  assert(true, "Should be reached here.")
end
test_omit_with_block_and_condition() click to toggle source
# File test-unit-3.3.4/test/test-omission.rb, line 34
def test_omit_with_block_and_condition
  omit_if(false, "Never omit.") do
    assert(true, "Should be reached here.")
  end
  omit_if(true, "Should omit.") do
    flunk("Never reached here.")
  end
  assert(true, "Should be reached here too.")
end
test_omit_with_condition() click to toggle source
# File test-unit-3.3.4/test/test-omission.rb, line 20
def test_omit_with_condition
  omit_if(false, "Never omit.")
  omit_unless(true, "Never omit too.")
  omit_if(true, "Should omit.")
  omit("The last omit. Should not be reached here.")
end