From bd076049a0971584bb0c5b73f702190a259899a3 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 30 Mar 2020 20:25:42 +0100 Subject: [PATCH] integration_test: only run on system Ruby. There appear to be random, seemingly impossible to debug issues with running integration tests on portable Ruby. Instead of confusing contributors when these will be run on CI anyway: let's just skip them by default (like we do with `--online` for online tests anyway). --- .../support/helper/spec/shared_context/integration_test.rb | 5 +++++ 1 file changed, 5 insertions(+) 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