aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
authordixpac <dino.onex@gmail.com>2017-01-10 14:58:28 +0100
committerdixpac <dino.onex@gmail.com>2017-01-12 17:21:56 +0100
commit8989a5057b6dc0e287a8b27ded31f08c5e56d0a7 (patch)
treee949aa43881afd227d97ba2e163d53bb16e65098 /railties/test/generators/app_generator_test.rb
parent242d7e1e039dd36e9868f13824cb6770a9d01076 (diff)
downloadrails-8989a5057b6dc0e287a8b27ded31f08c5e56d0a7.tar.gz
rails-8989a5057b6dc0e287a8b27ded31f08c5e56d0a7.tar.bz2
rails-8989a5057b6dc0e287a8b27ded31f08c5e56d0a7.zip
Initalize git repo when creatin new rails app
* If `--skip-git` is not specified initalize git repo when creating new rails app
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb9
1 files changed, 7 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