Sha256: eaf9c14399c33a94d7f2790ab0341fb9a717af7810812dccd2fc7bcf2a9f2b81

Contents?: true

Size: 861 Bytes

Versions: 83

Compression:

Stored size: 861 Bytes

Contents

describe :enumerable_include, :shared => true do
  it "returns true if any element == argument" do
    class EnumerableSpecIncludeP; def ==(obj) obj == 5; end; end

    elements = (0..5).to_a
    EnumerableSpecs::Numerous.new(*elements).send(@method,5).should == true 
    EnumerableSpecs::Numerous.new(*elements).send(@method,10).should == false
    EnumerableSpecs::Numerous.new(*elements).send(@method,EnumerableSpecIncludeP.new).should == true
  end
  
  it "returns true if any member of enum equals obj when == compare different classes (legacy rubycon)" do
    # equality is tested with ==
    EnumerableSpecs::Numerous.new(2,4,6,8,10).send(@method, 2.0).should == true
    EnumerableSpecs::Numerous.new(2,4,[6,8],10).send(@method, [6, 8]).should == true
    EnumerableSpecs::Numerous.new(2,4,[6,8],10).send(@method, [6.0, 8.0]).should == true
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.0 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.2 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.0 spec/framework_spec/app/spec/core/enumerable/shared/include.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/core/enumerable/shared/include.rb