mirror of
https://github.com/edgecase/ruby_koans.git
synced 2026-04-15 07:23:19 -04:00
Add koan on asserting exceptions
This commit is contained in:
@@ -57,4 +57,12 @@ class AboutExceptions < EdgeCase::Koan
|
||||
assert_equal __, result
|
||||
end
|
||||
|
||||
# Sometimes, we must know about the unknown
|
||||
def test_asserting_an_error_is_raised
|
||||
# A do-end is a block, a topic to explore more later
|
||||
assert_raise(___) do
|
||||
raise MySpecialError.new("New instances can be raised directly.")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user