2014-06-18 22:41:47 -05:00
|
|
|
module Homebrew
|
2012-04-16 16:44:11 -05:00
|
|
|
def tests
|
2015-01-02 12:42:02 +00:00
|
|
|
(HOMEBREW_LIBRARY/"Homebrew/test").cd do
|
|
|
|
ENV["TESTOPTS"] = "-v" if ARGV.verbose?
|
2015-07-21 15:02:15 +08:00
|
|
|
ENV["HOMEBREW_TESTS_COVERAGE"] = "1" if ARGV.include? "--coverage"
|
2015-07-22 17:09:23 +08:00
|
|
|
ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat"
|
2015-01-02 12:42:02 +00:00
|
|
|
Homebrew.install_gem_setup_path! "bundler"
|
2014-09-10 09:50:47 +01:00
|
|
|
quiet_system("bundle", "check") || \
|
|
|
|
system("bundle", "install", "--path", "vendor/bundle")
|
|
|
|
system "bundle", "exec", "rake", "test"
|
2015-01-02 13:36:01 +00:00
|
|
|
Homebrew.failed = !$?.success?
|
2012-04-16 16:44:11 -05:00
|
|
|
end
|
|
|
|
end
|
2012-03-25 00:49:18 +11:00
|
|
|
end
|