Sha256: ede2703cab98a032d6dd1052470b0ab73ca584585e2701e4bcde876569f16884

Contents?: true

Size: 358 Bytes

Versions: 2

Compression:

Stored size: 358 Bytes

Contents

require_relative '../../spec_helper'

describe Integer do

  describe :up_or_downto do
    it "behaves like Integer#upto for an increasing range" do
      10.up_or_downto(12).to_a.must_equal 10.upto(12).to_a
    end

    it "behaves like Integer#downto for a decreasing range" do
      10.up_or_downto(8).to_a.must_equal 10.downto(8).to_a
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aipp-0.2.4 spec/lib/core_ext/integer_spec.rb
aipp-0.2.3 spec/lib/core_ext/integer_spec.rb