Sha256: 71d7ec2fc8f8e1a44f15c1c5cdd9117c803dce11339ad4d808e8368aed3233c0
Contents?: true
Size: 978 Bytes
Versions: 1
Compression:
Stored size: 978 Bytes
Contents
require 'spec_helper' describe 'Veritas::Optimizer::Algebra::Extension::UnoptimizedOperand#optimize' do subject { object.optimize } let(:klass) { Optimizer::Algebra::Extension::UnoptimizedOperand } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:base) { Relation.new(header, [ [ 1 ] ].each) } let(:attribute) { Attribute::Object.new(:text) } let(:function) { lambda { |tuple| 1 } } let(:operand) { base.rename({}) } let(:relation) { operand.extend { |r| r.add(attribute, function) } } let(:object) { klass.new(relation) } before do object.operation.should be_kind_of(Algebra::Extension) end it { should_not equal(operand) } it { should be_kind_of(Algebra::Extension) } its(:operand) { should equal(base) } its(:extensions) { should == { attribute => function } } end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/optimizer/algebra/extension/unoptimized_operand/optimize_spec.rb |