Updatd exception koan to be clearer about StandardError VS RuntimeError
This commit is contained in:
@@ -22,8 +22,8 @@ class AboutExceptions < EdgeCase::Koan
|
||||
|
||||
assert_equal __, result
|
||||
|
||||
assert ex.is_a?(__)
|
||||
assert_equal __, ex.message
|
||||
assert_equal __, ex.is_a?(StandardError), "Should be a Standard Error"
|
||||
assert_equal __, ex.is_a?(RuntimeError), "Should be a Runtime Error"
|
||||
|
||||
assert RuntimeError.ancestors.include?(StandardError),
|
||||
"RuntimeError is a subclass of StandardError"
|
||||
|
||||
@@ -22,8 +22,8 @@ class AboutExceptions < EdgeCase::Koan
|
||||
|
||||
assert_equal __(:exception_handled), result
|
||||
|
||||
assert ex.is_a?(___(StandardError)), "Failure message."
|
||||
assert ex.is_a?(___(RuntimeError)), "Failure message."
|
||||
assert_equal __(true), ex.is_a?(StandardError), "Should be a Standard Error"
|
||||
assert_equal __(true), ex.is_a?(RuntimeError), "Should be a Runtime Error"
|
||||
|
||||
assert RuntimeError.ancestors.include?(StandardError), # __
|
||||
"RuntimeError is a subclass of StandardError"
|
||||
|
||||
Reference in New Issue
Block a user