spec/unit/veritas/optimizer/relation/operation/order/order_operand/optimizable_spec.rb in veritas-optimizer-0.0.4 vs spec/unit/veritas/optimizer/relation/operation/order/order_operand/optimizable_spec.rb in veritas-optimizer-0.0.5

- old
+ new

@@ -4,18 +4,18 @@ describe Optimizer::Relation::Operation::Order::OrderOperand, '#optimizable?' do subject { object.optimizable? } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } - let(:relation) { operand.order } + let(:relation) { operand.sort_by { |r| r.id } } let(:object) { described_class.new(relation) } before do object.operation.should be_kind_of(Relation::Operation::Order) end context 'when the operand is ordered' do - let(:operand) { base.order } + let(:operand) { base.sort_by { |r| r.id } } it { should be(true) } end context 'when the operand is not ordered' do