1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Don't be verbose while creating dummy application in plugin new generator

This commit is contained in:
Piotr Sarnacki 2010-10-28 03:00:42 +02:00
parent 013fc0a418
commit 489b279fc4
3 changed files with 19 additions and 3 deletions

View file

@ -6,6 +6,8 @@ else
gem "arel", :git => "git://github.com/rails/arel.git"
end
gem "thor", :git => "git://github.com/wycats/thor.git"
gem "rack", :git => "git://github.com/rack/rack.git"
gem "rails", :path => File.dirname(__FILE__)

View file

@ -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

View file

@ -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)