Sha256: 02c9b976c82a8f1e6e784ac14048de92b159adcd25db434562f38b2b9fcd3ba6
Contents?: true
Size: 729 Bytes
Versions: 3
Compression:
Stored size: 729 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Algebra::Rename::Aliases, '#inverse' do subject { object.inverse } let(:object) { described_class.new(aliases) } let(:attribute) { Attribute::Integer.new(:id) } context 'when aliases are empty' do let(:aliases) { {} } it_should_behave_like 'an invertible method' it { should be_instance_of(described_class) } its(:to_hash) { should == {} } end context 'when aliases are not empty' do let(:aliases) { { attribute => attribute.rename(:other_id) } } it_should_behave_like 'an invertible method' it { should be_instance_of(described_class) } its(:to_hash) { should == { attribute.rename(:other_id) => attribute } } end end
Version data entries
3 entries across 3 versions & 1 rubygems