diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 2 | ||||
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 9ddb3cae33..4967d1793c 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -202,7 +202,7 @@ task :default => :test end def create_test_dummy_files - return if options[:skip_test_unit] + return if options[:skip_test_unit] && options[:dummy_path] == 'test/dummy' create_dummy_app end diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 779e362d75..5ffc2501cd 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -182,6 +182,13 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_file "spec/dummy/config/application.rb" assert_no_file "test/dummy" end + + def test_creating_dummy_without_tests_but_with_dummy_path + run_generator [destination_root, "--dummy_path", "spec/dummy", "--skip-test-unit"] + assert_file "spec/dummy" + assert_file "spec/dummy/config/application.rb" + assert_no_file "test" + end def test_skipping_gemspec run_generator [destination_root, "--skip-gemspec"] |