From bd9ce22244da38fbd03c410bba37115a80864252 Mon Sep 17 00:00:00 2001 From: Shinji Nakamatsu <19329+snaka@users.noreply.github.com> Date: Fri, 12 Sep 2025 07:44:54 +0900 Subject: [PATCH 1/2] ci: add Ruby 3.4 and Rails 7.2 to test matrix - Add Ruby 3.4 to the test matrix - Add Gemfile.rails72 to test configurations --- .github/workflows/ruby.yml | 3 ++- Gemfile.rails72 | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Gemfile.rails72 diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 8e87809..4bc97c7 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -32,11 +32,12 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['3.1', '3.2', '3.3'] + ruby-version: ['3.1', '3.2', '3.3', '3.4'] test: ['minitest', 'rspec'] gemfile: - Gemfile.rails70 - Gemfile.rails71 + - Gemfile.rails72 - Gemfile.rails80 - Gemfile.railsmaster - Gemfile.mongo_mapper diff --git a/Gemfile.rails72 b/Gemfile.rails72 new file mode 100644 index 0000000..e25e19b --- /dev/null +++ b/Gemfile.rails72 @@ -0,0 +1,8 @@ +eval_gemfile('Gemfile.global') + +gem 'minitest', '~> 5.8' +gem 'rails', github: 'rails/rails', branch: '7-2-stable', require: false + +gem 'mongoid', github: 'mongodb/mongoid' + +gem 'sqlite3', platforms: [:ruby, :mswin, :mingw] From 307b28267bd14df06d1f83e90fb0b33ff8b79b90 Mon Sep 17 00:00:00 2001 From: Shinji Nakamatsu <19329+snaka@users.noreply.github.com> Date: Fri, 12 Sep 2025 08:23:16 +0900 Subject: [PATCH 2/2] test: fix hash output format compatibility across Ruby versions - Replace hardcoded hash strings with dynamic hash.inspect in RSpec matcher tests - Ensures test assertions work correctly with different Ruby hash formatting --- spec/enumerize/integrations/rspec/matcher_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/enumerize/integrations/rspec/matcher_spec.rb b/spec/enumerize/integrations/rspec/matcher_spec.rb index 93e9f63..4b24bee 100644 --- a/spec/enumerize/integrations/rspec/matcher_spec.rb +++ b/spec/enumerize/integrations/rspec/matcher_spec.rb @@ -107,14 +107,14 @@ def self.name end it 'rejects wrong keys' do - message = 'Expected Model to define enumerize :sex in: "{:boy=>0, :girl=>1}"' + message = "Expected Model to define enumerize :sex in: \"#{{boy: 0, girl: 1}.inspect}\"" expect do expect(subject).to enumerize(:sex).in(boy: 0, girl: 1) end.to fail_with(message) end it 'rejects wrong values' do - message = 'Expected Model to define enumerize :sex in: "{:male=>2, :female=>3}"' + message = "Expected Model to define enumerize :sex in: \"#{{male: 2, female: 3}.inspect}\"" expect do expect(subject).to enumerize(:sex).in(male: 2, female: 3) end.to fail_with(message)