From a7ad7eee78cd815d2e917c1f2a1ffaa6a24734cf Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Wed, 24 Oct 2018 15:40:06 -0700 Subject: [PATCH] test/spec_helper: Fix :needs_svn which("svn") detects shims/scm/svn even when svn is not installed. --- Library/Homebrew/test/spec_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 83afadad91..9b49b15b7c 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -98,7 +98,10 @@ RSpec.configure do |config| end config.before(:each, :needs_svn) do - skip "subversion not installed." unless which "svn" + homebrew_bin = File.dirname HOMEBREW_BREW_FILE + unless %W[/usr/bin/svn #{homebrew_bin}/svn].map { |x| File.executable?(x) }.any? + skip "subversion not installed." + end end config.before(:each, :needs_unzip) do