diff --git a/Appraisals b/Appraisals index e57a0d4..4e93d54 100644 --- a/Appraisals +++ b/Appraisals @@ -21,8 +21,8 @@ appraise 'rails-7.0' do end appraise 'rails-7.1' do - gem 'activemodel', '~> 7.1.0' - gem 'activesupport', '~> 7.1.0' + gem 'activemodel', '~> 7.1.0', '!= 7.1.4' # https://github.com/rails/rails/issues/52820 + gem 'activesupport', '~> 7.1.0', '!= 7.1.4' # https://github.com/rails/rails/issues/52820 end appraise 'rails-7.2' do diff --git a/gemfiles/rails_7.1.gemfile b/gemfiles/rails_7.1.gemfile index cf0b8c9..c812a3c 100644 --- a/gemfiles/rails_7.1.gemfile +++ b/gemfiles/rails_7.1.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "activemodel", "~> 7.1.0" -gem "activesupport", "~> 7.1.0" +gem "activemodel", "~> 7.1.0", "!= 7.1.4" +gem "activesupport", "~> 7.1.0", "!= 7.1.4" gemspec path: "../" diff --git a/spec/attribute_spec.rb b/spec/attribute_spec.rb index bebc6c2..c783aa2 100644 --- a/spec/attribute_spec.rb +++ b/spec/attribute_spec.rb @@ -14,6 +14,8 @@ class MockModel attribute :array, :array attribute :hash, :hash attribute :string_or_hash, %i[string hash] + + alias_attribute :proportion, :percentage end end @@ -25,6 +27,11 @@ class MockModel expect(model.name).to eq('bar') end + it 'defines attribute aliases' do + model.percentage = 18.6 + expect(model.proportion).to eq(18.6) + end + it 'applies an default value' do expect(model.name).to eq('Janet') expect(model.age).to eq(60)