require 'spec_helper' describe Range do describe "#include_with_range?" do it "to be true" do expect((1..5).include_with_range?(1..5)).to eq(true) expect((1..5).include_with_range?(2..3)).to eq(true) end it "to be false" do expect((1..5).include_with_range?(2..6)).to eq(false) end end describe "#overlaps?" do it "to be true" do expect((1..5).overlaps?(4..6)).to eq(true) end it "to be false" do expect((1..5).overlaps?(7..9)).to eq(false) end end end