diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-20 00:47:13 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-11-02 17:14:49 +0100 |
commit | b8a0fabe184f6c8f926f7869341ca40b6395606a (patch) | |
tree | 34b190b45b177ea5e9325ebe4b2aceef9a8f3170 /railties | |
parent | b37938eff72fe370ddc84afb656f6b4775053f6a (diff) | |
download | rails-b8a0fabe184f6c8f926f7869341ca40b6395606a.tar.gz rails-b8a0fabe184f6c8f926f7869341ca40b6395606a.tar.bz2 rails-b8a0fabe184f6c8f926f7869341ca40b6395606a.zip |
Ensure that options for plugin new generator are not passed to application generator
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 | 6 |
2 files changed, 7 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 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) |