Sha256: e4cf1b3dd12f4066dac99cf9f74e23d7700555125c51fead8001742e7fa44ca4
Contents?: true
Size: 775 Bytes
Versions: 2
Compression:
Stored size: 775 Bytes
Contents
require 'spec_helper' describe 'Veritas::Optimizer::Relation::Operation::Reverse::OrderOperand#optimizable?' do subject { object.optimizable? } let(:klass) { Optimizer::Relation::Operation::Reverse::OrderOperand } let(:base) { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ].each) } let(:relation) { operand.reverse } let(:object) { klass.new(relation) } before do object.operation.should be_kind_of(Relation::Operation::Reverse) end context 'when the operand is ordered' do let(:operand) { base.order } it { should be(true) } end context 'when the operand is not ordered' do let(:operand) { base.order.take(2) } it { should be(false) } end end
Version data entries
2 entries across 2 versions & 1 rubygems