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>
This commit is contained in:
Jack Nagel 2012-04-16 23:40:40 -05:00
parent c44cb2710b
commit 6e203a280c

View File

@ -23,12 +23,22 @@ end
class ConfigureTests < Test::Unit::TestCase
def test_detect_failed_configure
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