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-3.1.1 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.0 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.2 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.0 spec/framework_spec/app/spec/core/range/shared/include.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/core/range/shared/include.rb