mxcl/homebrew — pull request #11657 by jacknagel (2012-04-14 20:45:12+00:00)
Title: tests: replace tests script with rake-based runner

This should simplify things a bit.

```
$ rake -T
(in /usr/local/Library/Homebrew/test)
rake test # Run tests
rake test:ARGV # Run tests for ARGV
rake test:ENV # Run tests for ENV
rake test:bucket # Run tests for bucket
rake test:checksums # Run tests for checksums
rake test:compilers # Run tests for compilers
rake test:external_deps # Run tests for external_deps
rake test:formula # Run tests for formula
rake test:formula_install # Run tests for formula_install
rake test:hardware # Run tests for hardware
rake test:inreplace # Run tests for inreplace
rake test:patches # Run tests for patches
rake test:patching # Run tests for patching
rake test:pathname_install # Run tests for pathname_install
rake test:string # Run tests for string
rake test:updater # Run tests for updater
rake test:utils # Run tests for utils
rake test:versions # Run tests for versions
```

`rake` or `rake test` will run the entire test suite, but significantly reduce the output as it runs all the tests together instead of one file at a time.

Individual test files can be run by e.g. `rake test:formula`; these targets are generated dynamically so just adding a file is sufficient for `rake test` to pick it up.

As an added bonus the exit codes are handled correctly by `rake`.