Sha256: 20953f4154ed5b3d980164a947e617ffb774e5b8ced6ce465cd0cafd4c517e0f
Contents?: true
Size: 563 Bytes
Versions: 2
Compression:
Stored size: 563 Bytes
Contents
require 'test_helper' class SimpleItemWithGapsTest < ActiveSupport::TestCase # List: 1 (gap) 2 (gap) (gap) 3 (gap) 4 def setup 8.times { SimpleItem.create } [2,4,5,7].each { |index| SimpleItem.delete(index) } @items = SimpleItem.find(:all, :order => 'id') @ids = @items.map(&:id) end include SimpleTests include SimpleGapTests protected def ordered_ids SimpleItem.find(:all, :order => 'position', :conditions => 'position IS NOT NULL').map(&:id) end def create(*args) SimpleItem.create end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
aguids-positionable-0.2.1 | test/rails_root/test/unit/simple_item_with_gaps_test.rb |
aguids-positionable-0.2.2 | test/rails_root/test/unit/simple_item_with_gaps_test.rb |