diff options
author | Alberto Almagro <alberto.almagro@rakuten.com> | 2017-07-31 19:17:47 +0200 |
---|---|---|
committer | Alberto Almagro <alberto.almagro@rakuten.com> | 2017-07-31 20:06:26 +0200 |
commit | fd7f978a5068921380308fe439af3923566c8f61 (patch) | |
tree | c20963ef6b2e33e35c016180069df849a450703b /railties/test/generators | |
parent | 0f245882c9c8cdf15dcbb958680f7f2ea4f7d76a (diff) | |
download | rails-fd7f978a5068921380308fe439af3923566c8f61.tar.gz rails-fd7f978a5068921380308fe439af3923566c8f61.tar.bz2 rails-fd7f978a5068921380308fe439af3923566c8f61.zip |
Set Ruby version in Gemfile and .ruby-version by default
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index ffdee3a6b5..aec73b6955 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -4,6 +4,7 @@ require "generators/shared_generator_tests" DEFAULT_APP_FILES = %w( .gitignore + .ruby-version README.md Gemfile Rakefile @@ -805,6 +806,17 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_inclusion_of_ruby_version + run_generator + + assert_file "Gemfile" do |content| + assert_match(/ruby '#{RUBY_VERSION}'/, content) + end + assert_file ".ruby-version" do |content| + assert_match(/#{RUBY_VERSION}/, content) + end + end + def test_version_control_initializes_git_repo run_generator [destination_root] assert_directory ".git" |