spec/unit/veritas/optimizer/relation/operation/offset/zero_offset/optimizable_spec.rb in veritas-optimizer-0.0.4 vs spec/unit/veritas/optimizer/relation/operation/offset/zero_offset/optimizable_spec.rb in veritas-optimizer-0.0.5
- old
+ new
@@ -3,12 +3,12 @@
require 'spec_helper'
describe Optimizer::Relation::Operation::Offset::ZeroOffset, '#optimizable?' do
subject { object.optimizable? }
- let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each).order }
- let(:relation) { base.drop(offset) }
- let(:object) { described_class.new(relation) }
+ let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each).sort_by { |r| r.id } }
+ let(:relation) { base.drop(offset) }
+ let(:object) { described_class.new(relation) }
before do
object.operation.should be_kind_of(Relation::Operation::Offset)
end