Sha256: 73e17fcc1ac25af36abe96bc1320380e78bf76bebf69834623682716ead62cf3
Contents?: true
Size: 726 Bytes
Versions: 2
Compression:
Stored size: 726 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Projection::ProjectionOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.coerce([[:id, Integer], [:name, String], [:age, Integer]]) } let(:base) { Relation.new(header, LazyEnumerable.new([[1, 'Dan Kubb', 35]])) } let(:relation) { base.project([:id, :name]).project([:id]) } let(:object) { described_class.new(relation) } before do expect(object).to be_optimizable end it { should be_kind_of(Algebra::Projection) } its(:operand) { should be(base) } its(:header) { should == [header[:id]] } end
Version data entries
2 entries across 2 versions & 1 rubygems