From bdbb15e5a5c647823aa6b9fd04020dab16360ae1 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 13 May 2011 01:41:52 +0200 Subject: new reporting method Kernel#quietly --- railties/test/generators/app_generator_test.rb | 2 +- railties/test/generators/plugin_new_generator_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/test/generators') diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 5175a6e2e6..8de829b6dd 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -66,7 +66,7 @@ class AppGeneratorTest < Rails::Generators::TestCase end def test_application_new_exits_with_non_zero_code_on_invalid_application_name - silence_stderr { `rails new test` } + quietly { system 'rails new test' } assert_equal false, $?.success? end diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index 673856c34d..2af728e766 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -122,14 +122,14 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase def test_ensure_that_tests_work run_generator FileUtils.cd destination_root - `bundle install` # use backticks to silence stdout + quietly { system 'bundle install' } assert_match(/1 tests, 1 assertions, 0 failures, 0 errors/, `bundle exec rake test`) end def test_ensure_that_tests_works_in_full_mode run_generator [destination_root, "--full", "--skip_active_record"] FileUtils.cd destination_root - `bundle install` # use backticks to silence stdout + quietly { system 'bundle install' } assert_match(/1 tests, 1 assertions, 0 failures, 0 errors/, `bundle exec rake test`) end -- cgit v1.2.3