Sha256: 8562717c3ade96603e48d2feab1ae57fb1d0f29769d95ca7612329a0d1ca2f63
Contents?: true
Size: 689 Bytes
Versions: 4
Compression:
Stored size: 689 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Rename::SetOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:left) { Relation.new(header, [ [ 1 ] ].each) } let(:right) { Relation.new(header, [ [ 2 ] ].each) } let(:relation) { left.union(right).rename(:id => :other_id) } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should be_kind_of(Relation::Operation::Set) } its(:left) { should eql(left.rename(:id => :other_id)) } its(:right) { should eql(right.rename(:id => :other_id)) } end
Version data entries
4 entries across 4 versions & 1 rubygems