mxcl/homebrew — pull request #11713 by jacknagel (2012-04-18 00:30:10+00:00)
Title: Add 'shutup' method for ultra-quiet tests

Here's an alternative to silencing `patch`.

With this, the normal patch output is left untouched but the patching tests give:

```
$ rake test:patching
(in /Users/jacknagel/src/homebrew/Library/Homebrew/test)
Loaded suite /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake/rake_test_loader
Started
....
Finished in 0.27168 seconds.

4 tests, 8 assertions, 0 failures, 0 errors
```

and thus the entire test suite is now quiet:

```
$ rake test
(in /Users/jacknagel/src/homebrew/Library/Homebrew/test)
Loaded suite /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake/rake_test_loader
Started
........................................................................................................................
Finished in 1.106488 seconds.

120 tests, 241 assertions, 0 failures, 0 errors
```

Another alternative would be to tweak `nostdout` to reopen stdout on /dev/null, which would be propagated into child processes, but this is less invasive and I didn't want to audit everything that uses `nostdout`.