Sha256: 87b86faa69d6c0720509463f66593f58ad64cf7b10fbe9ca405af51abd042f58

Contents?: true

Size: 635 Bytes

Versions: 4

Compression:

Stored size: 635 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Algebra::Rename, '#aliases' do
  subject { object.aliases }

  let(:attribute) { Attribute::Integer.new(:id)          }
  let(:header)    { Relation::Header.new([ attribute ])  }
  let(:base)      { Relation.new(header, [ [ 1 ] ].each) }
  let(:aliases)   { { :id => :other_id }                 }
  let(:object)    { described_class.new(relation)        }

  before do
    object.operation.should be_kind_of(Algebra::Rename)
  end

  let(:relation) { base.rename(aliases) }

  it { should be_kind_of(Algebra::Rename::Aliases) }

  it { should equal(relation.aliases) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/algebra/rename/aliases_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/algebra/rename/aliases_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/algebra/rename/aliases_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/algebra/rename/aliases_spec.rb