Skip to content
Browse files

Updatd exception koan to be clearer about StandardError VS RuntimeError

  • Loading branch information...
1 parent 9291f53 commit d3ce64a7685e3e0f1ffe7e616d9f243d19f23785 @jimweirich jimweirich committed
Showing with 4 additions and 4 deletions.
  1. +2 −2 koans/about_exceptions.rb
  2. +2 −2 src/about_exceptions.rb
View
4 koans/about_exceptions.rb
@@ -22,8 +22,8 @@ def test_rescue_clause
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
4 src/about_exceptions.rb
@@ -22,8 +22,8 @@ def test_rescue_clause
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"

0 comments on commit d3ce64a

Please sign in to comment.
Something went wrong with that request. Please try again.