mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-21 01:03:20 -04:00
Merged src directory with existing koans.
This commit is contained in:
@@ -6,10 +6,10 @@ class AboutExceptions < EdgeCase::Koan
|
||||
end
|
||||
|
||||
def test_exceptions_inherit_from_Exception
|
||||
assert MySpecialError.ancestors.include?(RuntimeError)
|
||||
assert MySpecialError.ancestors.include?(StandardError)
|
||||
assert MySpecialError.ancestors.include?(Exception)
|
||||
assert MySpecialError.ancestors.include?(Object)
|
||||
assert_equal __, MySpecialError.ancestors[1]
|
||||
assert_equal __, MySpecialError.ancestors[2]
|
||||
assert_equal __, MySpecialError.ancestors[3]
|
||||
assert_equal __, MySpecialError.ancestors[4]
|
||||
end
|
||||
|
||||
def test_rescue_clause
|
||||
@@ -40,7 +40,7 @@ class AboutExceptions < EdgeCase::Koan
|
||||
result = :exception_handled
|
||||
end
|
||||
|
||||
assert_equal __(:exception_handled), result
|
||||
assert_equal __, result
|
||||
assert_equal __, ex.message
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user