From 268fa841deec9d18bfa0e16b109b7cf0d08099ec Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Thu, 28 Jan 2016 00:02:01 +0100 Subject: [PATCH] tests: fix simplecov handling in integration tests Closes Homebrew/homebrew#48250. Signed-off-by: Baptiste Fontaine --- Library/Homebrew/test/test_integration_cmds.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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