Sha256: 8d5c8d495031f30f91be7bc68d1ec53d8ea5613efb3ba0159bd7b043930d0359
Contents?: true
Size: 755 Bytes
Versions: 2
Compression:
Stored size: 755 Bytes
Contents
require 'spec_helper' describe 'Veritas::Optimizer::Algebra::Rename::EmptyOperand#optimizable?' do subject { object.optimizable? } let(:klass) { Optimizer::Algebra::Rename::EmptyOperand } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:relation) { operand.rename(:id => :other_id) } let(:object) { klass.new(relation) } before do object.operation.should be_kind_of(Algebra::Rename) end context 'when the operand is an empty relation' do let(:operand) { Relation::Empty.new(header) } it { should be(true) } end context 'when the operand is not an empty relation' do let(:operand) { Relation.new(header, [ [ 1 ] ]) } it { should be(false) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/optimizer/algebra/rename/empty_operand/optimizable_spec.rb |
veritas-0.0.1 | spec/unit/veritas/optimizer/algebra/rename/empty_operand/optimizable_spec.rb |