2015-12-16 00:07:31 -05:00
|
|
|
# frozen_string_literal: false
|
2011-07-10 08:19:16 -04:00
|
|
|
require 'test/unit'
|
|
|
|
|
|
|
|
class TestE < Test::Unit::TestCase
|
2012-08-20 20:07:32 -04:00
|
|
|
class UnknownError < RuntimeError; end
|
|
|
|
|
2011-07-10 08:19:16 -04:00
|
|
|
def test_not_fail
|
|
|
|
assert_equal(1,1)
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_always_skip
|
|
|
|
skip "always"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_always_fail
|
|
|
|
assert_equal(0,1)
|
|
|
|
end
|
|
|
|
|
2014-05-15 08:31:26 -04:00
|
|
|
def test_skip_after_unknown_error
|
|
|
|
begin
|
|
|
|
raise UnknownError, "unknown error"
|
|
|
|
rescue
|
|
|
|
skip "after raise"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-08-20 20:07:32 -04:00
|
|
|
def test_unknown_error
|
|
|
|
raise UnknownError, "unknown error"
|
|
|
|
end
|
|
|
|
end
|