diff --git a/Library/Homebrew/dev-cmd/tests.rb b/Library/Homebrew/dev-cmd/tests.rb index c37c15d50ea31e..b623e9d932fe13 100644 --- a/Library/Homebrew/dev-cmd/tests.rb +++ b/Library/Homebrew/dev-cmd/tests.rb @@ -45,8 +45,6 @@ def run # Given we might be testing various commands, we probably want everything (except sorbet-static) Homebrew.install_bundler_gems!(groups: Homebrew.valid_gem_groups - ["sorbet"]) - require "debug" if args.debug? - HOMEBREW_LIBRARY_PATH.cd do setup_environment! @@ -137,6 +135,8 @@ def run puts "Randomized with seed #{seed}" + ENV["HOMEBREW_DEBUG"] = "1" if args.debug? # Used in spec_helper.rb to require the "debug" gem. + # Submit test flakiness information using BuildPulse # BUILDPULSE used in spec_helper.rb if use_buildpulse? diff --git a/Library/Homebrew/test/migrator_spec.rb b/Library/Homebrew/test/migrator_spec.rb index 4494b919b73450..87fadd5e955558 100644 --- a/Library/Homebrew/test/migrator_spec.rb +++ b/Library/Homebrew/test/migrator_spec.rb @@ -69,8 +69,6 @@ tab.source["tap"] = "homebrew/core" tab.write - binding.b - expect do described_class.new(new_formula, "oldname") end.to raise_error(Migrator::MigratorDifferentTapsError) diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 517acadb8cc260..b525f7a11bc7ee 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -37,6 +37,8 @@ require_relative "../global" +require "debug" if ENV["HOMEBREW_DEBUG"] + require "test/support/quiet_progress_formatter" require "test/support/helper/cask" require "test/support/helper/files"