summaryrefslogtreecommitdiff
path: root/spec/ruby/core/enumerator/arithmetic_sequence/step_spec.rb
blob: c1f2d9173f51ed41c63d3f9e7e9f99c1e16e4ae9 (plain)
1
2
3
4
5
6
7
8
9
10
11
require_relative '../../../spec_helper'

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.step(10).step.should == 1
    1.step(10, 3).step.should == 3
  end
end