diff options
author | Richard Schneeman <richard.schneeman@gmail.com> | 2015-10-23 06:36:01 -0500 |
---|---|---|
committer | Richard Schneeman <richard.schneeman@gmail.com> | 2015-10-23 06:36:01 -0500 |
commit | 976debac891dc9c59fa27d954ed34e6a90c98114 (patch) | |
tree | edb35f76881a40a3920f340f6ed03c5bb6df1e4d | |
parent | 2ad9afe4ff2c12d1a9e4a00d9009d040e636c9b0 (diff) | |
parent | 65590e3c968b81f78c2ff33945ba819f607391d8 (diff) | |
download | rails-976debac891dc9c59fa27d954ed34e6a90c98114.tar.gz rails-976debac891dc9c59fa27d954ed34e6a90c98114.tar.bz2 rails-976debac891dc9c59fa27d954ed34e6a90c98114.zip |
Merge pull request #22041 from y-yagi/remove_unnecessary_files_indummy_application
remove unnecessary readme in dummy application
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/plugin_generator.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb index c65b8b84be..eeeef430bb 100644 --- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb +++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb @@ -117,7 +117,7 @@ task default: :test remove_file "Gemfile" remove_file "lib/tasks" remove_file "public/robots.txt" - remove_file "README" + remove_file "README.md" remove_file "test" remove_file "vendor" end diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index a19a29056d..715debf344 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -440,6 +440,19 @@ class PluginGeneratorTest < Rails::Generators::TestCase end end + def test_unnecessary_files_are_not_generated_in_dummy_application + run_generator + assert_no_file 'test/dummy/.gitignore' + assert_no_file 'test/dummy/db/seeds.rb' + assert_no_file 'test/dummy/Gemfile' + assert_no_file 'test/dummy/public/robots.txt' + assert_no_file 'test/dummy/README.md' + assert_no_directory 'test/dummy/lib/tasks' + assert_no_directory 'test/dummy/doc' + assert_no_directory 'test/dummy/test' + assert_no_directory 'test/dummy/vendor' + end + def test_skipping_test_files run_generator [destination_root, "--skip-test"] assert_no_file "test" |