Updatd exception koan to be clearer about StandardError VS RuntimeError

This commit is contained in:
Jim Weirich
2010-11-29 09:02:22 -05:00
parent 9291f534c6
commit d3ce64a768
2 changed files with 4 additions and 4 deletions

View File

@@ -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"

View File

@@ -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"