diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 7d16a7f17db95..2b5e07ff62ec5 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -1028,10 +1028,8 @@ def test_bootsnap_with_dev_option def test_inclusion_of_ruby_version run_generator - ruby_version = "#{Gem::Version.new(Gem::VERSION) >= Gem::Version.new("3.3.13") ? Gem.ruby_version : RUBY_VERSION}" - assert_file "Dockerfile" do |content| - assert_match(/ARG RUBY_VERSION=#{ruby_version}/, content) + assert_match(/ARG RUBY_VERSION=#{Gem.ruby_version}/, content) end assert_file ".ruby-version" do |content| if ENV["RBENV_VERSION"]