Refator Hash.fetch test

This commit is contained in:
Jun Hiroe
2015-09-26 09:58:02 +09:00
parent 524a038876
commit 570c261555
+1 -3
View File
@@ -76,10 +76,8 @@ assert('Hash#fetch') do
assert_equal "mickey", h.fetch("mouse", "mickey")
assert_equal "minny", h.fetch("mouse"){"minny"}
assert_equal "mouse", h.fetch("mouse"){|k| k}
begin
assert_raise(KeyError) do
h.fetch("gnu")
rescue => e
assert_kind_of(KeyError, e);
end
end