blob: 20a5cb6e7bf609471f6611fd3230f0efe9d61dd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require_relative '../../../spec_helper'
ruby_version_is "2.6" do
describe "Enumerator::ArithmeticSequence#step" do
it "returns the original value given to step method" do
(1..10).step.step.should == 1
(1..10).step(3).step.should == 3
(1..10).step(0).step.should == 0
1.step(10).step.should == 1
1.step(10, 3).step.should == 3
1.step(10, 0).step.should == 0
end
end
end
|