aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/app_generator_test.rb
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-09-25 07:10:05 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-09-25 13:05:21 +0900
commit229f5361232d66efcc3a77381f0055764540c761 (patch)
tree939faa2ff9313f30400905802538e5bb5522342a /railties/test/generators/app_generator_test.rb
parentab08f33f312c20638b9a7c38ee6318727c7f107d (diff)
downloadrails-229f5361232d66efcc3a77381f0055764540c761.tar.gz
rails-229f5361232d66efcc3a77381f0055764540c761.tar.bz2
rails-229f5361232d66efcc3a77381f0055764540c761.zip
Respect quiet option in all process of `rails new` command
If specify the `quiet` option, expect that no status will be shown. However, some process show status. This suppresses all status output.
Diffstat (limited to 'railties/test/generators/app_generator_test.rb')
-rw-r--r--railties/test/generators/app_generator_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 904e2a5c84..20f593f25c 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -560,6 +560,11 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_no_match(/run git init/, output)
end
+ def test_quiet_option
+ output = run_generator [File.join(destination_root, "myapp"), "--quiet"]
+ assert_empty output
+ end
+
def test_application_name_with_spaces
path = File.join(destination_root, "foo bar")
@@ -737,7 +742,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
sequence = ["git init", "install", "exec spring binstub --all", "echo ran after_bundle"]
@sequence_step ||= 0
- ensure_bundler_first = -> command do
+ ensure_bundler_first = -> command, options = nil do
assert_equal sequence[@sequence_step], command, "commands should be called in sequence #{sequence}"
@sequence_step += 1
end