mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-21 01:03:20 -04:00
Evaluated each assert line without a replacement test specified.
This commit is contained in:
@@ -22,12 +22,12 @@ class AboutExceptions < EdgeCase::Koan
|
||||
|
||||
assert_equal __(:exception_handled), result
|
||||
|
||||
assert ex.is_a?(StandardError), "Failure message."
|
||||
assert ex.is_a?(RuntimeError), "Failure message."
|
||||
assert ex.is_a?(___(StandardError)), "Failure message."
|
||||
assert ex.is_a?(___(RuntimeError)), "Failure message."
|
||||
|
||||
assert RuntimeError.ancestors.include?(StandardError),
|
||||
assert RuntimeError.ancestors.include?(StandardError), # __
|
||||
"RuntimeError is a subclass of StandardError"
|
||||
|
||||
|
||||
assert_equal __("Oops"), ex.message
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ class AboutExceptions < EdgeCase::Koan
|
||||
end
|
||||
|
||||
# Sometimes, we must know about the unknown
|
||||
def test_asserting_an_error_is_raised
|
||||
def test_asserting_an_error_is_raised # __
|
||||
# A do-end is a block, a topic to explore more later
|
||||
assert_raise(___(MySpecialError)) do
|
||||
raise MySpecialError.new("New instances can be raised directly.")
|
||||
|
||||
Reference in New Issue
Block a user