Permalink
Browse files

Add test case for Integer#step

  • Loading branch information...
1 parent ef17231 commit b4647224b765380e5f40d0af7927355709bce346 @bovi bovi committed Sep 15, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 test/t/integer.rb
View
@@ -172,3 +172,19 @@
end
a == 6
end
+
+# Not ISO specified
+
+assert('Integer#step') do
+ a = []
+ b = []
+ 1.step(3) do |i|
+ a << i
+ end
+ 1.step(6, 2) do |i|
+ b << i
+ end
+
+ a == [1, 2, 3] and
+ b == [1, 3, 5]
+end

0 comments on commit b464722

Please sign in to comment.