spec/unit/veritas/optimizer/relation/operation/reverse/reverse_operand/optimize_spec.rb in veritas-optimizer-0.0.4 vs spec/unit/veritas/optimizer/relation/operation/reverse/reverse_operand/optimize_spec.rb in veritas-optimizer-0.0.5

- old
+ new

@@ -4,10 +4,10 @@ describe Optimizer::Relation::Operation::Reverse::ReverseOperand, '#optimize' do subject { object.optimize } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } - let(:limit) { base.order.take(2) } + let(:limit) { base.sort_by { |r| r.id }.take(2) } let(:operand) { limit.reverse } let(:relation) { operand.reverse } let(:object) { described_class.new(relation) } before do