Sha256: 0968c3d9d17102db4f8e328237f34df080f6816ed35e807073ee61568191ef5f

Contents?: true

Size: 364 Bytes

Versions: 1

Compression:

Stored size: 364 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

1 entries across 1 versions & 1 rubygems

Version Path
aipp-0.2.5 spec/lib/core_ext/integer_spec.rb