diff options
| author | Jack Nagel | 2012-04-16 23:40:40 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-04-16 23:45:44 -0500 |
| commit | 6e203a280c5201203bd985481031fa48061c1536 (patch) | |
| tree | bee67113ce241d5568344b2f69a29f9501b07e64 /Library | |
| parent | c44cb2710ba94e2caaae5de480a895ed2aab490e (diff) | |
| download | brew-6e203a280c5201203bd985481031fa48061c1536.tar.bz2 | |
tests: silence test_detect_failed_configure
The standard `nostdout` method doesn't work here because Formula#system
does some redirection of its own; both stdout and stderr have to be of
the same type, so just do it manually here.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_formula_install.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_formula_install.rb b/Library/Homebrew/test/test_formula_install.rb index ab31005fb..7a69a50af 100644 --- a/Library/Homebrew/test/test_formula_install.rb +++ b/Library/Homebrew/test/test_formula_install.rb @@ -23,12 +23,22 @@ end class ConfigureTests < Test::Unit::TestCase def test_detect_failed_configure - f=ConfigureFails.new + tmperr = $stderr + tmpout = $stdout + require 'stringio' + $stderr = StringIO.new + $stdout = StringIO.new + + f = ConfigureFails.new + begin f.brew { f.install } rescue BuildError => e assert e.was_running_configure? end + + $stderr = tmperr + $stdout = tmpout end end |
