Sha256: 462552ba00cefe80696d8f7f483a2143a8ae7a0a579c8b2c012a37b09565a893
Contents?: true
Size: 878 Bytes
Versions: 1
Compression:
Stored size: 878 Bytes
Contents
require 'spec_helper' describe 'Veritas::Optimizer::Relation::Operation::Offset::UnoptimizedOperand#optimizable?' do subject { object.optimizable? } let(:klass) { Optimizer::Relation::Operation::Offset::UnoptimizedOperand } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:base) { Relation.new(header, [ [ 1 ] ].each).order } let(:relation) { operand.drop(1) } let(:object) { klass.new(relation) } before do object.operation.should be_kind_of(Relation::Operation::Offset) end context 'when the operand is optimizable' do let(:operand) { base.rename({}) } it { should be(true) } end context 'when the operand is not optimizable' do let(:operand) { base } it { should be(false) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/optimizer/relation/operation/offset/unoptimized_operand/optimizable_spec.rb |