Sha256: 687d9f6e3d580f63a1f7b049a2bfa914a8e49175c5f78d067c1f463171dea0b7

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Algebra::Rename::Aliases, '#[]' do
  subject { object[attribute] }

  let(:attribute) { Attribute::Integer.new(:id)  }
  let(:object)    { described_class.new(aliases) }

  context 'when attribute is not renamed' do
    let(:aliases) { {} }

    it { should equal(attribute) }
  end

  context 'when attribute is renamed' do
    let(:renamed) { attribute.rename(:other_id) }
    let(:aliases) { { attribute => renamed }    }

    it { should equal(renamed) }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/algebra/rename/aliases/element_reader_spec.rb
veritas-0.0.7 spec/unit/veritas/algebra/rename/aliases/element_reference_spec.rb
veritas-0.0.6 spec/unit/veritas/algebra/rename/aliases/element_reference_spec.rb
veritas-0.0.5 spec/unit/veritas/algebra/rename/aliases/element_reference_spec.rb
veritas-0.0.4 spec/unit/veritas/algebra/rename/aliases/element_reference_spec.rb