Skip to content

Commit

Permalink
Updatd exception koan to be clearer about StandardError VS RuntimeError
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Nov 29, 2010
1 parent 9291f53 commit d3ce64a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions koans/about_exceptions.rb
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/about_exceptions.rb
Expand Up @@ -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"
Expand Down

0 comments on commit d3ce64a

Please sign in to comment.