From d053780a1552682d5ac5d0584f86d147c772dc33 Mon Sep 17 00:00:00 2001 From: Garry L Hurley Jr <166545206+GarryHurleyJr@users.noreply.github.com> Date: Thu, 6 Jun 2024 16:28:57 -0400 Subject: [PATCH] Enabled Rubocon rule for the MetadataStyle test (#9921) --- .rubocop_todo.yml | 10 ---------- .../hex/update_checker/version_resolver_spec.rb | 2 +- .../spec/dependabot/terraform/file_parser_spec.rb | 2 +- updater/spec/dependabot/file_fetcher_command_spec.rb | 12 ++++++------ 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6d09c5e027..72d409e79e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -135,16 +135,6 @@ RSpec/MessageChain: RSpec/MessageSpies: Enabled: false -# Offense count: 8 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: hash, symbol -RSpec/MetadataStyle: - Exclude: - - 'hex/spec/dependabot/hex/update_checker/version_resolver_spec.rb' - - 'terraform/spec/dependabot/terraform/file_parser_spec.rb' - - 'updater/spec/dependabot/file_fetcher_command_spec.rb' - # Offense count: 1 RSpec/MultipleDescribes: Exclude: diff --git a/hex/spec/dependabot/hex/update_checker/version_resolver_spec.rb b/hex/spec/dependabot/hex/update_checker/version_resolver_spec.rb index 735e14f2c3..094f15235b 100644 --- a/hex/spec/dependabot/hex/update_checker/version_resolver_spec.rb +++ b/hex/spec/dependabot/hex/update_checker/version_resolver_spec.rb @@ -100,7 +100,7 @@ context "with a dependency with a bad specification" do let(:mixfile_fixture_name) { "bad_spec" } - it "raises a DependencyFileNotResolvable error", skip_ci: true do + it "raises a DependencyFileNotResolvable error", :skip_ci do expect { resolver.latest_resolvable_version } .to raise_error(Dependabot::DependencyFileNotResolvable) end diff --git a/terraform/spec/dependabot/terraform/file_parser_spec.rb b/terraform/spec/dependabot/terraform/file_parser_spec.rb index 24b9ff933b..93a91a6f8a 100644 --- a/terraform/spec/dependabot/terraform/file_parser_spec.rb +++ b/terraform/spec/dependabot/terraform/file_parser_spec.rb @@ -914,7 +914,7 @@ end end - context "with a private module proxy that can't be reached", vcr: true do + context "with a private module proxy that can't be reached", :vcr do before do artifactory_repo_url = "http://artifactory.dependabot.com/artifactory/tf-modules/azurerm" diff --git a/updater/spec/dependabot/file_fetcher_command_spec.rb b/updater/spec/dependabot/file_fetcher_command_spec.rb index 28194a4a2b..408ed14848 100644 --- a/updater/spec/dependabot/file_fetcher_command_spec.rb +++ b/updater/spec/dependabot/file_fetcher_command_spec.rb @@ -43,7 +43,7 @@ Dependabot::Experiments.reset! end - it "fetches the files and writes the fetched files to output.json", vcr: true do + it "fetches the files and writes the fetched files to output.json", :vcr do expect(api_client).not_to receive(:mark_job_as_processed) perform_job @@ -56,7 +56,7 @@ expect(dependency_file["content_encoding"]).to eq("utf-8") end - context "when the fetcher raises a ToolVersionNotSupported error", vcr: true do + context "when the fetcher raises a ToolVersionNotSupported error", :vcr do before do allow_any_instance_of(Dependabot::Bundler::FileFetcher) .to receive(:commit).and_return("a" * 40) @@ -124,7 +124,7 @@ end end - context "when the fetcher raises a file fetcher error (cloud)", vcr: true do + context "when the fetcher raises a file fetcher error (cloud)", :vcr do before do allow_any_instance_of(Dependabot::Bundler::FileFetcher) .to receive(:commit) @@ -172,7 +172,7 @@ end end - context "when the fetcher raises a file fetcher error (ghes)", vcr: true do + context "when the fetcher raises a file fetcher error (ghes)", :vcr do before do allow_any_instance_of(Dependabot::Bundler::FileFetcher) .to receive(:commit) @@ -232,7 +232,7 @@ end end - context "when vendoring dependencies", vcr: true do + context "when vendoring dependencies", :vcr do let(:job_definition) do JSON.parse(fixture("jobs/job_with_vendor_dependencies.json")) end @@ -314,7 +314,7 @@ end end - context "when the connectivity check is enabled", vcr: true do + context "when the connectivity check is enabled", :vcr do before do allow(ENV).to receive(:[]).and_call_original allow(ENV).to receive(:[]).with("ENABLE_CONNECTIVITY_CHECK").and_return("1")