define global `shutup` method (temporary)
solves the following error: ```bash $ bundle exec rake test ... NoMethodError: undefined method `shutup' ... ``` This is not a permanent solution. The test suite should be changed around to find the new `shutup` method, which is still in Homebrew, but no longer global.
This commit is contained in:
parent
04a84b5bef
commit
62fff58f48
|
@ -22,6 +22,24 @@ $:.push(homebrew_path.join('Library', 'Homebrew'))
|
|||
# require homebrew testing env
|
||||
require 'test/testing_env'
|
||||
|
||||
# todo temporary, copied from old Homebrew, this method is now moved inside a class
|
||||
def shutup
|
||||
if ARGV.verbose?
|
||||
yield
|
||||
else
|
||||
begin
|
||||
tmperr = $stderr.clone
|
||||
tmpout = $stdout.clone
|
||||
$stderr.reopen '/dev/null', 'w'
|
||||
$stdout.reopen '/dev/null', 'w'
|
||||
yield
|
||||
ensure
|
||||
$stderr.reopen tmperr
|
||||
$stdout.reopen tmpout
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# making homebrew's cache dir allows us to actually download casks in tests
|
||||
HOMEBREW_CACHE.mkpath
|
||||
HOMEBREW_CACHE.join('Casks').mkpath
|
||||
|
|
Loading…
Reference in New Issue