aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/tests.rb
blob: a686a7f8c517855507932b70e3560c3283b3a735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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