diff options
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 8 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 12 |
2 files changed, 16 insertions, 4 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index c294bfb238..3ceb8c22a0 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -250,10 +250,10 @@ class AppGeneratorTest < Rails::Generators::TestCase end def test_generator_if_skip_index_html_is_given - run_generator [destination_root, "--skip-index-html"] - assert_no_file "public/index.html" - assert_no_file "app/assets/images/rails.png" - assert_file "app/assets/images/.gitkeep" + run_generator [destination_root, '--skip-index-html'] + assert_no_file 'public/index.html' + assert_no_file 'app/assets/images/rails.png' + assert_file 'app/assets/images/.keep' end def test_creation_of_a_test_directory diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index e78e67725d..a4bdfcf438 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -127,6 +127,18 @@ module SharedGeneratorTests # generated. assert_file 'Gemfile' end + + def test_skip_git + run_generator [destination_root, '--skip-git', '--full'] + assert_no_file('.gitignore') + assert_file('app/mailers/.keep') + end + + def test_skip_keeps + run_generator [destination_root, '--skip-keeps', '--full'] + assert_file('.gitignore') + assert_no_file('app/mailers/.keep') + end end module SharedCustomGeneratorTests |