Skip to content

Commit

Permalink
Include final newline in generated .ruby-version
Browse files Browse the repository at this point in the history
  • Loading branch information
orhantoy committed Apr 1, 2019
1 parent e0a9e02 commit db4c6f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -1 +1 @@
<%= ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}" -%>
<%= ENV["RBENV_VERSION"] || ENV["rvm_ruby_string"] || "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}" %>
2 changes: 2 additions & 0 deletions railties/test/generators/app_generator_test.rb
Expand Up @@ -968,6 +968,8 @@ def test_inclusion_of_ruby_version
else
assert_match(/#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}/, content)
end

assert content.end_with?("\n"), "expected .ruby-version to end with newline"
end
end

Expand Down

0 comments on commit db4c6f5

Please sign in to comment.