Sha256: ad7f415103647f36d6549f79b32c07e7df5363d31fecf55636caf145e5b104dc

Contents?: true

Size: 797 Bytes

Versions: 11

Compression:

Stored size: 797 Bytes

Contents

require 'spec_helper'

shared_examples_for 'DataMapper::OrderedSet#<< when appending a not yet included entry' do
  its(:size   ) { should == 2            }
  its(:entries) { should include(entry1) }
  its(:entries) { should include(entry2) }

  it 'should not alter the position of the existing entry' do
    subject.entries.index(entry1).should == @old_index
  end

  it 'should append columns at the end of the set' do
    subject.entries.index(entry2).should == @old_index + 1
  end
end

shared_examples_for 'DataMapper::OrderedSet#<< when updating an already included entry' do
  its(:size   ) { should == 1            }
  its(:entries) { should include(entry2) }

  it 'should not alter the position of the existing entry' do
    subject.entries.index(entry2).should == @old_index
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
ardm-core-1.3.0 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
ardm-core-1.2.1 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.2.1 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
ghost_dm-core-1.3.0.beta spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.2.0 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.2.0.rc2 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.2.0.rc1 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.1.0 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.1.0.rc3 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.1.0.rc2 spec/unit/data_mapper/ordered_set/shared/append_spec.rb
dm-core-1.1.0.rc1 spec/unit/data_mapper/ordered_set/shared/append_spec.rb