From d7ebf97467f1145ee7c6ecc3962b4c095071b7ba Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sun, 18 Feb 2024 15:17:25 -0800 Subject: [PATCH] Turn on disable_monkey_patching --- Library/Homebrew/test/cask/download_spec.rb | 2 +- Library/Homebrew/test/dev-cmd/audit_spec.rb | 4 ++-- Library/Homebrew/test/formula_free_port_spec.rb | 2 +- Library/Homebrew/test/rubocops/shell_commands_spec.rb | 4 ++-- Library/Homebrew/test/spec_helper.rb | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/test/cask/download_spec.rb b/Library/Homebrew/test/cask/download_spec.rb index 532cecbd10c71..5fb0f0cbe0a6b 100644 --- a/Library/Homebrew/test/cask/download_spec.rb +++ b/Library/Homebrew/test/cask/download_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Cask - describe Download, :cask do + RSpec.describe Download, :cask do describe "#verify_download_integrity" do subject(:verification) { described_class.new(cask).verify_download_integrity(downloaded_path) } diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 1c95aa58a3a9b..4b85beadbe005 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -17,7 +17,7 @@ def self.increment end module Homebrew - describe FormulaTextAuditor do + RSpec.describe FormulaTextAuditor do alias_matcher :have_data, :be_data alias_matcher :have_end, :be_end alias_matcher :have_trailing_newline, :be_trailing_newline @@ -56,7 +56,7 @@ class #{Formulary.class_s(name)} < Formula end end - describe FormulaAuditor do + RSpec.describe FormulaAuditor do let(:dir) { mktmpdir } let(:foo_version) { Count.increment } let(:formula_subpath) { "Formula/foo#{foo_version}.rb" } diff --git a/Library/Homebrew/test/formula_free_port_spec.rb b/Library/Homebrew/test/formula_free_port_spec.rb index 834346c649f28..d3e907825a231 100644 --- a/Library/Homebrew/test/formula_free_port_spec.rb +++ b/Library/Homebrew/test/formula_free_port_spec.rb @@ -4,7 +4,7 @@ require "formula_free_port" module Homebrew - describe FreePort do + RSpec.describe FreePort do include described_class describe "#free_port" do diff --git a/Library/Homebrew/test/rubocops/shell_commands_spec.rb b/Library/Homebrew/test/rubocops/shell_commands_spec.rb index 4011d19968e3b..6c464f3e83f0b 100644 --- a/Library/Homebrew/test/rubocops/shell_commands_spec.rb +++ b/Library/Homebrew/test/rubocops/shell_commands_spec.rb @@ -5,7 +5,7 @@ module RuboCop module Cop module Homebrew - describe ShellCommands do + ::RSpec.describe ShellCommands do subject(:cop) { described_class.new } context "when auditing shell commands" do @@ -213,7 +213,7 @@ def install end end - describe ExecShellMetacharacters do + ::RSpec.describe ExecShellMetacharacters do subject(:cop) { described_class.new } context "when auditing exec calls" do diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index d5e0f035ecffb..f158f47e445d5 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -67,6 +67,7 @@ config.raise_errors_for_deprecations! config.warnings = true + config.disable_monkey_patching! config.filter_run_when_matching :focus