Handle 1.8 VS 1.9 differences in fetch exception.
[ruby_koans.git] / src / about_hashes.rb
index 0915fa6..27a6fd1 100644 (file)
@@ -23,7 +23,7 @@ class AboutHashes < EdgeCase::Koan
   def test_accessing_hashes_with_fetch
     hash = { :one => "uno" }
     assert_equal "uno", hash.fetch(:one)
-    assert_raise(___(IndexError)) do
+    assert_raise(___(IndexError, KeyError)) do
       hash.fetch(:doesnt_exist)
     end