From 83ead25229336d39bb90a548b1728f72c7baeaff Mon Sep 17 00:00:00 2001 From: Issy Long Date: Fri, 19 Feb 2021 23:25:10 +0000 Subject: [PATCH] rubocop: Disable `RSpec/ContextWording` for `shared_context` descs - I couldn't figure out a way to start these with "when", "with" or "without" given where these are in cop descriptions. Three ignored things out of 150 problems is a good ratio though. --- Library/Homebrew/test/commands_spec.rb | 2 +- .../test/support/helper/spec/shared_context/homebrew_cask.rb | 2 +- .../test/support/helper/spec/shared_context/integration_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/test/commands_spec.rb b/Library/Homebrew/test/commands_spec.rb index ab17fcf065..d817a4c80a 100644 --- a/Library/Homebrew/test/commands_spec.rb +++ b/Library/Homebrew/test/commands_spec.rb @@ -3,7 +3,7 @@ require "commands" -RSpec.shared_context "with custom internal commands" do +RSpec.shared_context "custom internal commands" do # rubocop:disable RSpec/ContextWording let(:cmds) do [ # internal commands diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb b/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb index 1682091b97..4058dd0ac2 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb @@ -31,7 +31,7 @@ module Cask end end -RSpec.shared_context "Homebrew Cask", :needs_macos do +RSpec.shared_context "Homebrew Cask", :needs_macos do # rubocop:disable RSpec/ContextWording around do |example| third_party_tap = Tap.fetch("third-party", "tap") diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb index 21ea723f60..a4208287f3 100644 --- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb +++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb @@ -7,7 +7,7 @@ require "formula_installer" RSpec::Matchers.define_negated_matcher :be_a_failure, :be_a_success -RSpec.shared_context "integration test" do +RSpec.shared_context "integration test" do # rubocop:disable RSpec/ContextWording extend RSpec::Matchers::DSL matcher :be_a_success do