diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-10-28 03:00:42 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-11-02 17:14:52 +0100 |
commit | 489b279fc499f135df48556554739c19d316df0a (patch) | |
tree | b7b1c87abfb6faff849421b759e2dc70fb0d1854 /railties | |
parent | 013fc0a418379d6f62bbd1f86d2b5bd674927fe7 (diff) | |
download | rails-489b279fc499f135df48556554739c19d316df0a.tar.gz rails-489b279fc499f135df48556554739c19d316df0a.tar.bz2 rails-489b279fc499f135df48556554739c19d316df0a.zip |
Don't be verbose while creating dummy application in plugin new generator
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 16 | ||||
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 4 |
2 files changed, 17 insertions, 3 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 e464279af6..7b202344ee 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 @@ -146,16 +146,22 @@ end def create_test_dummy_files say_status :vendor_app, dummy_path - build(:generate_test_dummy) + mute do + build(:generate_test_dummy) + end end def change_config_files store_application_definition! - build(:test_dummy_config) + mute do + build(:test_dummy_config) + end end def remove_uneeded_rails_files - build(:test_dummy_clean) + mute do + build(:test_dummy_clean) + end end def finish_template @@ -219,6 +225,10 @@ end builder.send(name) if builder.respond_to?(name) end end + + def mute(&block) + shell.mute(&block) + end end end end diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 53e1dd6708..985ef088e5 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -103,6 +103,10 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_file "lib/bukkits.rb", /require "bukkits\/engine"/ end + def test_being_quiet_while_creating_dummy_application + assert_no_match /create\s+config\/application.rb/, run_generator + end + protected def action(*args, &block) |