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:
parent
c44cb2710b
commit
6e203a280c
@ -23,12 +23,22 @@ end
|
|||||||
|
|
||||||
class ConfigureTests < Test::Unit::TestCase
|
class ConfigureTests < Test::Unit::TestCase
|
||||||
def test_detect_failed_configure
|
def test_detect_failed_configure
|
||||||
|
tmperr = $stderr
|
||||||
|
tmpout = $stdout
|
||||||
|
require 'stringio'
|
||||||
|
$stderr = StringIO.new
|
||||||
|
$stdout = StringIO.new
|
||||||
|
|
||||||
f = ConfigureFails.new
|
f = ConfigureFails.new
|
||||||
|
|
||||||
begin
|
begin
|
||||||
f.brew { f.install }
|
f.brew { f.install }
|
||||||
rescue BuildError => e
|
rescue BuildError => e
|
||||||
assert e.was_running_configure?
|
assert e.was_running_configure?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
$stderr = tmperr
|
||||||
|
$stdout = tmpout
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user