aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb10
1 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..ee996dc9d6 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -592,6 +592,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_pretend_option
output = run_generator [File.join(destination_root, "myapp"), "--pretend"]
assert_no_match(/run bundle install/, output)
+ assert_no_match(/run git init/, output)
end
def test_application_name_with_spaces
@@ -731,6 +732,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 +783,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 +798,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
end
- assert_equal 3, @sequence_step
+ assert_equal 4, @sequence_step
end
private