Sha256: adb247ae6cc10b0b66be2e677a335dd908a0814e5ac65d271280ff69b639623a

Contents?: true

Size: 810 Bytes

Versions: 83

Compression:

Stored size: 810 Bytes

Contents

describe :range_include, :shared => true do
  it "returns true if other is an element of self" do
    (0..5).send(@method, 2).should == true
    (-5..5).send(@method, 0).should == true
    (-1...1).send(@method, 10.5).should == false
    (-10..-2).send(@method, -2.5).should == true
    ('C'..'X').send(@method, 'M').should == true
    ('C'..'X').send(@method, 'A').should == false
    ('B'...'W').send(@method, 'W').should == false
    ('B'...'W').send(@method, 'Q').should == true
    (0xffff..0xfffff).send(@method, 0xffffd).should == true
    (0xffff..0xfffff).send(@method, 0xfffd).should == false
    (0.5..2.4).send(@method, 2).should == true
    (0.5..2.4).send(@method, 2.5).should == false
    (0.5..2.4).send(@method, 2.4).should == true
    (0.5...2.4).send(@method, 2.4).should == false
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-1.4.2 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-1.4.1 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-1.4.0 spec/framework_spec/app/spec/core/range/shared/include.rb