From 5c1109a68e098188803a6232be55dfff1e5e12eb Mon Sep 17 00:00:00 2001 From: Ivan Vanderbyl Date: Tue, 23 Aug 2011 20:10:37 +1000 Subject: Added a generator option to remove the public/index.html file when generating a new Rails application The option is: -i, [--skip-index-html] # Skip public/index.html file --- railties/test/generators/app_generator_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties/test') diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index d8887a6471..8bcc40a0dd 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -240,6 +240,13 @@ class AppGeneratorTest < Rails::Generators::TestCase end 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" + end + def test_creation_of_a_test_directory run_generator assert_file 'test' -- cgit v1.2.3