aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/tests.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/dev-cmd/tests.rb')
-rw-r--r--Library/Homebrew/dev-cmd/tests.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb
index 72d6143fc..da1f5365c 100644
--- a/Library/Homebrew/dev-cmd/tests.rb
+++ b/Library/Homebrew/dev-cmd/tests.rb
@@ -49,8 +49,6 @@ module Homebrew
FileUtils.rm_f "test/coverage/.resultset.json"
end
- ENV["BUNDLE_GEMFILE"] = "#{HOMEBREW_LIBRARY_PATH}/test/Gemfile"
-
# Override author/committer as global settings might be invalid and thus
# will cause silent failure during the setup of dummy Git repositories.
%w[AUTHOR COMMITTER].each do |role|
@@ -59,10 +57,7 @@ module Homebrew
ENV["GIT_#{role}_DATE"] = "Sun Jan 22 19:59:13 2017 +0000"
end
- Homebrew.install_gem_setup_path! "bundler"
- unless quiet_system("bundle", "check")
- system "bundle", "install"
- end
+ Homebrew.run_bundler_if_needed!
parallel = true
@@ -106,10 +101,15 @@ module Homebrew
files = files.reject { |p| p =~ %r{^test/os/linux(/.*|_spec\.rb)$} }
end
- if parallel
- system "bundle", "exec", "parallel_rspec", *opts, "--", *args, "--", *files
- else
- system "bundle", "exec", "rspec", *args, "--", *files
+ files.map! { |p| HOMEBREW_LIBRARY_PATH/p }
+
+ (HOMEBREW_LIBRARY_PATH/"vendor/#{RUBY_ENGINE}/#{RUBY_VERSION}").cd do
+ if parallel
+ system "parallel_rspec", *opts, "--", *args, "--", *files
+ else
+ system "rspec", *args, "--", *files
+ end
+ FileUtils.rm_rf "tmp"
end
return if $?.success?