mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #33152 from bogdanvlviv/fix-ruby-version-file
Fix Ruby version in `.ruby-version`
This commit is contained in:
commit
433a312269
2 changed files with 8 additions and 2 deletions
|
@ -1 +1 @@
|
|||
<%= "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}" -%>
|
||||
<%= ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}" -%>
|
||||
|
|
|
@ -891,7 +891,13 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
assert_match(/ruby '#{RUBY_VERSION}'/, content)
|
||||
end
|
||||
assert_file ".ruby-version" do |content|
|
||||
assert_match(/#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}/, content)
|
||||
if ENV["RBENV_VERSION"]
|
||||
assert_match(/#{ENV["RBENV_VERSION"]}/, content)
|
||||
elsif ENV["rvm_ruby_string"]
|
||||
assert_match(/#{ENV["rvm_ruby_string"]}/, content)
|
||||
else
|
||||
assert_match(/#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}/, content)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue