diff --git a/Library/Homebrew/test/cask/download_spec.rb b/Library/Homebrew/test/cask/download_spec.rb index 532cecbd10..5fb0f0cbe0 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 1c95aa58a3..4b85beadbe 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -17,7 +17,7 @@ module Count 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 @@ module Homebrew 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 834346c649..d3e907825a 100644 --- a/Library/Homebrew/test/formula_free_port_spec.rb +++ b/Library/Homebrew/test/formula_free_port_spec.rb @@ -4,7 +4,7 @@ require "socket" 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 4011d19968..6c464f3e83 100644 --- a/Library/Homebrew/test/rubocops/shell_commands_spec.rb +++ b/Library/Homebrew/test/rubocops/shell_commands_spec.rb @@ -5,7 +5,7 @@ require "rubocops/shell_commands" 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 @@ module RuboCop 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 d5e0f035ec..f158f47e44 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -67,6 +67,7 @@ RSpec.configure do |config| config.raise_errors_for_deprecations! config.warnings = true + config.disable_monkey_patching! config.filter_run_when_matching :focus