spec/unit/veritas/optimizer/algebra/restriction/order_operand/optimize_spec.rb in veritas-optimizer-0.0.4 vs spec/unit/veritas/optimizer/algebra/restriction/order_operand/optimize_spec.rb in veritas-optimizer-0.0.5

- old
+ new

@@ -5,10 +5,10 @@ describe Optimizer::Algebra::Restriction::OrderOperand, '#optimize' do subject { object.optimize } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } let(:predicate) { base[:id].eq(1) } - let(:relation) { base.order.restrict { predicate } } + let(:relation) { base.sort_by { |r| r.id }.restrict { predicate } } let(:object) { described_class.new(relation) } before do object.should be_optimizable end