diff options
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" |