Sha256: 4a3bd2ed2d05869d5d65f0619db0df81127801bdcd85c961d56ab3d142c3eb42

Contents?: true

Size: 595 Bytes

Versions: 6

Compression:

Stored size: 595 Bytes

Contents

require "spec_helper"

describe Array do
  it "is bigger" do
    [1].should > [0]
    [1].should_not > [1]
  end

  it "is smaller" do
    [1].should < [2]
    [1].should_not < [1]
  end

  it "is smaller or equal" do
    [1].should <= [1]
    [1].should_not <= [0]
  end

  it "is bigger or equal" do
    [1].should >= [1]
    [1].should_not >= [2]
  end

  it "is between" do
    [1].between?([1],[1]).should == true
    [1].between?([1],[2]).should == true
    [1].between?([0],[1]).should == true
    [1].between?([0],[0]).should == false
    [1].between?([2],[2]).should == false
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruco-0.2.18 spec/ruco/core_ext/array_spec.rb
ruco-0.2.17 spec/ruco/core_ext/array_spec.rb
ruco-0.2.16 spec/ruco/core_ext/array_spec.rb
ruco-0.2.15 spec/ruco/core_ext/array_spec.rb
ruco-0.2.14 spec/ruco/core_ext/array_spec.rb
ruco-0.2.13 spec/ruco/core_ext/array_spec.rb