test/test_veil.rb in veils-0.1.0 vs test/test_veil.rb in veils-0.1.1
- old
+ new
@@ -60,6 +60,15 @@
assert_equal(3, foo.count)
observed = 0
foo.each { |_| observed += 1 }
assert_equal(3, observed)
end
+
+ def test_iterates_array_twice
+ origin = [1, 2, 3]
+ foo = Veil.new(origin, count: 1)
+ assert_equal(1, foo.count)
+ observed = 0
+ foo.each { |_| observed += 1 }
+ assert_equal(3, observed)
+ end
end