Skip to content

Commit

Permalink
Add test case for Integer#step
Browse files Browse the repository at this point in the history
  • Loading branch information
bovi committed Sep 15, 2012
1 parent ef17231 commit b464722
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/t/integer.rb
Expand Up @@ -172,3 +172,19 @@
end end
a == 6 a == 6
end 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.