Sha256: 1d5b7ce1d97dff34b71c7ed69cdf570b7a2614ee926abc903fd68d8929c649a1
Contents?: true
Size: 611 Bytes
Versions: 4
Compression:
Stored size: 611 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Algebra::Rename::Aliases, '#each' do subject { object.each { |old_attr, new_attr| yields << [ old_attr, new_attr ] } } let(:attribute) { Attribute::Integer.new(:id) } let(:aliases) { { attribute => attribute.rename(:other_id) } } let(:object) { described_class.new(aliases) } let(:yields) { [] } it_should_behave_like 'an #each method' it 'yields each alias' do expect { subject }.to change { yields.dup }. from([]). to(aliases.to_a) end end
Version data entries
4 entries across 4 versions & 1 rubygems