Mike McQuaid 9e8103cf38 Add Homebrew.install_gem_setup_path! function.
This uses the logic from tests.rb in man.rb too so that this can be
shared in a few places.
2015-01-02 12:42:02 +00:00

13 lines
363 B
Ruby

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