diff --git a/Library/Homebrew/load_path.rb b/Library/Homebrew/load_path.rb index c3eb983565..ea9f8a2306 100644 --- a/Library/Homebrew/load_path.rb +++ b/Library/Homebrew/load_path.rb @@ -4,6 +4,9 @@ require "pathname" HOMEBREW_LIBRARY_PATH = Pathname(__dir__).realpath.freeze -$LOAD_PATH.push(HOMEBREW_LIBRARY_PATH.to_s) unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s) +$LOAD_PATH.push HOMEBREW_LIBRARY_PATH.to_s require "vendor/bundle/bundler/setup" + +$LOAD_PATH.select! { |d| Pathname(d).directory? } +$LOAD_PATH.uniq! diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index c5adb08b86..0a28b8b558 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -9,11 +9,6 @@ RSpec::Matchers.define_negated_matcher :be_a_failure, :be_a_success RSpec.shared_context "integration test" do extend RSpec::Matchers::DSL - if OS.mac? && - !RUBY_BIN.to_s.match?(%r{^/(System/Library/Frameworks/Ruby\.framework/Versions/(Current|\d+\.\d+)/)usr/bin$}) - skip "integration test requires system Ruby" - end - matcher :be_a_success do match do |actual| status = actual.is_a?(Proc) ? actual.call : actual