Sha256: 404427f3654dc2798d60fdf645e82274a4be3815c8b6208b8c4fefe44bbdafe0
Contents?: true
Size: 695 Bytes
Versions: 4
Compression:
Stored size: 695 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Rename::RenameOperand, '#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.rename(:name => :other_name).rename(:id => :other_id) } let(:object) { described_class.new(relation) } before do object.should be_optimizable end it { should be_kind_of(Algebra::Rename) } its(:operand) { should equal(base) } its(:header) { should == [ [ :other_id, Integer ], [ :other_name, String ] ] } end
Version data entries
4 entries across 4 versions & 1 rubygems