diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index d2256ee971..09adaf78ef 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -30,7 +30,14 @@ class IntegrationCommandTests < Homebrew::TestCase -rconfig -rintegration_mocks ] - cmd_args << "-rsimplecov" if ENV["HOMEBREW_TESTS_COVERAGE"] + if ENV["HOMEBREW_TESTS_COVERAGE"] + # This is needed only because we currently use a patched version of + # simplecov, and gems installed through git are not available without + # requiring bundler/setup first. See also the comment in test/Gemfile. + # Remove this line when we'll switch back to a stable simplecov release. + cmd_args << "-rbundler/setup" + cmd_args << "-rsimplecov" + end cmd_args << (HOMEBREW_LIBRARY_PATH/"../brew.rb").resolved_path.to_s cmd_args += args Bundler.with_original_env do