Skip to content

Commit 1f5df41

Browse files
yahondaEarlopain
andcommitted
Use Gem.ruby_version in test_inclusion_of_ruby_version test
Rails main branch requires Ruby 3.2.0 that ships RubyGems 3.4.1 that is higher than 3.3.3, so we can use `Gem.ruby_version` in `test_inclusion_of_ruby_version` test. As per commented at rails#53072 (comment) Co-authored-by: Earlopain <[email protected]>
1 parent 10cd569 commit 1f5df41

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

railties/test/generators/app_generator_test.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,10 +1028,8 @@ def test_bootsnap_with_dev_option
10281028
def test_inclusion_of_ruby_version
10291029
run_generator
10301030

1031-
ruby_version = "#{Gem::Version.new(Gem::VERSION) >= Gem::Version.new("3.3.13") ? Gem.ruby_version : RUBY_VERSION}"
1032-
10331031
assert_file "Dockerfile" do |content|
1034-
assert_match(/ARG RUBY_VERSION=#{ruby_version}/, content)
1032+
assert_match(/ARG RUBY_VERSION=#{Gem.ruby_version}/, content)
10351033
end
10361034
assert_file ".ruby-version" do |content|
10371035
if ENV["RBENV_VERSION"]

0 commit comments

Comments
 (0)