From b8a0fabe184f6c8f926f7869341ca40b6395606a Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 20 Oct 2010 00:47:13 +0200 Subject: Ensure that options for plugin new generator are not passed to application generator --- .../lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 2 +- railties/test/generators/plugin_new_generator_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'railties') 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 9ee7edfc2b..06ef158a51 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 @@ -37,7 +37,7 @@ module Rails def test_dummy invoke Rails::Generators::AppGenerator, - [ File.expand_path(dummy_path, destination_root) ] + [ File.expand_path(dummy_path, destination_root) ], {} end def test_dummy_config diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 3c38dffce2..fa00e75132 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -104,6 +104,12 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_file "test/support/integration_case.rb", /class ActiveSupport::IntegrationCase/ end + def test_ensure_that_plugin_options_are_not_passed_app_generator + output = run_generator [destination_root, "--skip_gemfile"] + assert_no_file "Gemfile" + assert_match /STEP 2.*create Gemfile/m, output + end + protected def action(*args, &block) -- cgit v1.2.3