spec/unit/veritas/optimizer/relation/operation/limit/zero_limit/optimizable_spec.rb in veritas-optimizer-0.0.4 vs spec/unit/veritas/optimizer/relation/operation/limit/zero_limit/optimizable_spec.rb in veritas-optimizer-0.0.5

- old
+ new

@@ -3,12 +3,12 @@ require 'spec_helper' describe Optimizer::Relation::Operation::Limit::ZeroLimit, '#optimizable?' do subject { object.optimizable? } - let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each).order } - let(:relation) { base.take(limit) } - let(:object) { described_class.new(relation) } + let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each).sort_by { |r| r.id } } + let(:relation) { base.take(limit) } + let(:object) { described_class.new(relation) } before do object.operation.should be_kind_of(Relation::Operation::Limit) end