Baptiste Fontaine 44a8ebdc7e 'brew tests' optional coverage measure added
Closes Homebrew/homebrew#41890.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-07-20 20:44:12 +02:00

14 lines
445 B
Ruby

module Homebrew
def tests
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.flag? "--coverage"
Homebrew.install_gem_setup_path! "bundler"
quiet_system("bundle", "check") || \
system("bundle", "install", "--path", "vendor/bundle")
system "bundle", "exec", "rake", "test"
Homebrew.failed = !$?.success?
end
end
end