diff options
| author | Jack Nagel | 2012-04-16 23:40:40 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-04-16 23:45:44 -0500 |
| commit | 78c58feda7ae326b98933a6ccd71d6c263ac2b67 (patch) | |
| tree | 07786ad9d752507a5ecde9eab41f10f3ccf808ac /Library | |
| parent | 64943d679570263ea9750cb6b68a9ba0e375fb0e (diff) | |
| download | homebrew-78c58feda7ae326b98933a6ccd71d6c263ac2b67.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 |
