test/rrrretry_test.rb in rrrretry-0.0.1 vs test/rrrretry_test.rb in rrrretry-1.0.0
- old
+ new
@@ -28,6 +28,20 @@
i
end
assert_equal 1, result
GenericEnumerable.new([]).retry {} # ensure no errors
end
-end
\ No newline at end of file
+
+ def test_raising_stop_iteration
+ assert_raise(StopIteration) do
+ 2.times.retry do
+ raise StopIteration
+ end
+ end
+
+ assert_raise(StopIteration) do
+ 1.times.retry do
+ raise StopIteration
+ end
+ end
+ end
+end