diff --git a/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb b/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb index e035e4a9cc..3b8664573f 100644 --- a/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb +++ b/Library/Homebrew/extend/os/mac/dev-cmd/bottle.rb @@ -2,17 +2,21 @@ # frozen_string_literal: true module Homebrew - sig { returns(T::Array[String]) } - def self.tar_args - if MacOS.version >= :catalina - ["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze - else - [].freeze + class << self + undef tar_args + sig { returns(T::Array[String]) } + def tar_args + if MacOS.version >= :catalina + ["--no-mac-metadata", "--no-acls", "--no-xattrs"].freeze + else + [].freeze + end + end + + undef gnu_tar + sig { params(gnu_tar_formula: Formula).returns(String) } + def gnu_tar(gnu_tar_formula) + "#{gnu_tar_formula.opt_bin}/gtar" end end - - sig { params(gnu_tar_formula: Formula).returns(String) } - def self.gnu_tar(gnu_tar_formula) - "#{gnu_tar_formula.opt_bin}/gtar" - end end diff --git a/Library/Homebrew/livecheck/skip_conditions.rb b/Library/Homebrew/livecheck/skip_conditions.rb index 9b34e7f6d7..a90d5e5d4f 100644 --- a/Library/Homebrew/livecheck/skip_conditions.rb +++ b/Library/Homebrew/livecheck/skip_conditions.rb @@ -1,8 +1,6 @@ # typed: true # frozen_string_literal: true -require "livecheck/livecheck" - module Homebrew module Livecheck # The `Livecheck::SkipConditions` module primarily contains methods that diff --git a/Library/Homebrew/test/livecheck/skip_conditions_spec.rb b/Library/Homebrew/test/livecheck/skip_conditions_spec.rb index 4d3e9d9eab..cb0c28fd9d 100644 --- a/Library/Homebrew/test/livecheck/skip_conditions_spec.rb +++ b/Library/Homebrew/test/livecheck/skip_conditions_spec.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +require "livecheck/livecheck" require "livecheck/skip_conditions" describe Homebrew::Livecheck::SkipConditions do diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 51ed09c898..938ff52fde 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -66,6 +66,7 @@ RSpec.configure do |config| config.order = :random config.raise_errors_for_deprecations! + config.warnings = true config.filter_run_when_matching :focus @@ -179,6 +180,7 @@ RSpec.configure do |config| end config.around do |example| + undef find_files if defined? find_files def find_files return [] unless File.exist?(TEST_TMPDIR)