diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-18 02:00:41 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-01-18 02:00:41 -0500 |
commit | aa70abbc55463fa4f4361ac0def809d4e29d7e3b (patch) | |
tree | 74a83415f2da32e46c7af316b22eb63d70bbfe11 /railties/test/generators | |
parent | 8d009674af182f369b5e9d2a587dbf625dcdd0c4 (diff) | |
parent | 8989a5057b6dc0e287a8b27ded31f08c5e56d0a7 (diff) | |
download | rails-aa70abbc55463fa4f4361ac0def809d4e29d7e3b.tar.gz rails-aa70abbc55463fa4f4361ac0def809d4e29d7e3b.tar.bz2 rails-aa70abbc55463fa4f4361ac0def809d4e29d7e3b.zip |
Merge pull request #27632 from dixpac/repo_initialize
Initalize git repo when creatin new rails app
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 9 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 20de2258c5..35f7d519d8 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -731,6 +731,11 @@ class AppGeneratorTest < Rails::Generators::TestCase end end + def test_version_control_initializes_git_repo + run_generator [destination_root] + assert_directory ".git" + end + def test_create_keeps run_generator folders_with_keep = %w( @@ -777,7 +782,7 @@ class AppGeneratorTest < Rails::Generators::TestCase template end - sequence = ["install", "exec spring binstub --all", "echo ran after_bundle"] + sequence = ["git init", "install", "exec spring binstub --all", "echo ran after_bundle"] @sequence_step ||= 0 ensure_bundler_first = -> command do assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}" @@ -792,7 +797,7 @@ class AppGeneratorTest < Rails::Generators::TestCase end end - assert_equal 3, @sequence_step + assert_equal 4, @sequence_step end private diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index 08b0e34fe2..cc9d3629e9 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -109,6 +109,7 @@ module SharedGeneratorTests def test_skip_git run_generator [destination_root, "--skip-git", "--full"] assert_no_file(".gitignore") + assert_no_directory(".git") end def test_skip_keeps |