Sha256: a28f21aadffe69f7a9cadf18f614fe6cdb12c3e33c470559b39faf1fc97c7500
Contents?: true
Size: 1.21 KB
Versions: 11
Compression:
Stored size: 1.21 KB
Contents
require 'spec_helper' require 'dm-core/support/ordered_set' describe 'DataMapper::OrderedSet#eql?' do subject { ordered_set.eql?(other) } let(:original_entry) { 1 } let(:ordered_set) { DataMapper::OrderedSet.new([ original_entry ]) } context 'with the same ordered_set' do let(:other) { ordered_set } it { should be(true) } it 'is symmetric' do should == other.eql?(ordered_set) end end context 'with equivalent ordered_set' do let(:other) { ordered_set.dup } it { should be(true) } it 'is symmetric' do should == other.eql?(ordered_set) end end context 'with both containing no ordered_set' do let(:ordered_set) { DataMapper::OrderedSet.new } let(:other) { DataMapper::OrderedSet.new } it { should be(true) } it 'is symmetric' do should == other.eql?(ordered_set) end end context 'with different ordered_set' do let(:different_entry) { 2 } let(:other) { DataMapper::OrderedSet.new([ different_entry ]) } it { should be(false) } it 'is symmetric' do should == other.eql?(ordered_set) end end end
Version data entries
11 entries across 11 versions & 3 rubygems