diff options
-rw-r--r-- | railties/lib/generators/rails/app/app_generator.rb | 7 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/generators/rails/app/app_generator.rb b/railties/lib/generators/rails/app/app_generator.rb index ea1930a966..92e0d37436 100644 --- a/railties/lib/generators/rails/app/app_generator.rb +++ b/railties/lib/generators/rails/app/app_generator.rb @@ -138,8 +138,11 @@ module Rails::Generators end def create_prototype_files - return if options[:skip_prototype] - directory "public/javascripts" + unless options[:skip_prototype] + directory "public/javascripts" + else + empty_directory_with_gitkeep "public/javascripts" + end end def create_script_files diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 01d643cd8c..412034029e 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -107,6 +107,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_prototype_and_test_unit_are_skipped_if_required run_generator [destination_root, "--skip-prototype", "--skip-testunit"] assert_no_file "public/javascripts/prototype.js" + assert_file "public/javascripts" assert_no_file "test" end |