From 66ccd656e2f6e4785cdcdc87306d312828e61d4e Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Fri, 6 Sep 2024 13:58:56 -0300 Subject: [PATCH] Test on Rails 7.2 (#54) --- .github/workflows/test.yml | 12 +++++++++++- Appraisals | 5 +++++ gemfiles/rails_7.2.gemfile | 8 ++++++++ spec/persistence_spec.rb | 4 ++-- 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 gemfiles/rails_7.2.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3a881f9..378f3c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - gemfile: ['rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0', 'rails_7.1'] + gemfile: ['rails_5.2', 'rails_6.0', 'rails_6.1', 'rails_7.0', 'rails_7.1', 'rails_7.2'] ruby: ['2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] @@ -61,6 +61,16 @@ jobs: gemfile: 'rails_7.1' - ruby: '2.6' gemfile: 'rails_7.1' + - ruby: '2.4' + gemfile: 'rails_7.2' + - ruby: '2.5' + gemfile: 'rails_7.2' + - ruby: '2.6' + gemfile: 'rails_7.2' + - ruby: '2.7' + gemfile: 'rails_7.2' + - ruby: '3.0' + gemfile: 'rails_7.2' env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile diff --git a/Appraisals b/Appraisals index 67edb04..e57a0d4 100644 --- a/Appraisals +++ b/Appraisals @@ -24,3 +24,8 @@ appraise 'rails-7.1' do gem 'activemodel', '~> 7.1.0' gem 'activesupport', '~> 7.1.0' end + +appraise 'rails-7.2' do + gem 'activemodel', '~> 7.2.0' + gem 'activesupport', '~> 7.2.0' +end diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile new file mode 100644 index 0000000..414dc73 --- /dev/null +++ b/gemfiles/rails_7.2.gemfile @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activemodel", "~> 7.2.0" +gem "activesupport", "~> 7.2.0" + +gemspec path: "../" diff --git a/spec/persistence_spec.rb b/spec/persistence_spec.rb index bc9811a..6ec5d21 100644 --- a/spec/persistence_spec.rb +++ b/spec/persistence_spec.rb @@ -277,7 +277,7 @@ class MockModelNoAllIndex < MockModel end describe 'update_attributes!' do - around(:each) { |example| ActiveSupport::Deprecation.silence { example.run } } + around(:each) { |example| ActiveSupport::Deprecation.new.silence { example.run } } it 'updates the given attributes' do model.update_attributes!(name: 'Derp', age: 29) @@ -331,7 +331,7 @@ class MockModelNoAllIndex < MockModel end describe 'update_attributes' do - around(:each) { |example| ActiveSupport::Deprecation.silence { example.run } } + around(:each) { |example| ActiveSupport::Deprecation.new.silence { example.run } } it 'updates the given attributes' do model.update_attributes(name: 'Derp', age: 29)