Sha256: 1de2a5aad41a5ca2146af39c77e4e47bd345712f3d2aa92dcda709f5088f626d
Contents?: true
Size: 701 Bytes
Versions: 4
Compression:
Stored size: 701 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Rename::ProjectionOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.new([ [ :id, Integer ], [ :name, String ] ]) } let(:base) { Relation.new(header, [ [ 1, 'Dan Kubb' ] ].each) } let(:relation) { base.project([ :id ]).rename(:id => :other_id) } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should be_kind_of(Algebra::Projection) } its(:operand) { should eql(base.rename(:id => :other_id)) } its(:header) { should == [ [ :other_id, Integer ] ] } end
Version data entries
4 entries across 4 versions & 1 rubygems