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 0a28b8b558..c5adb08b86 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,6 +9,11 @@ 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