From 1e8d80992455d2b3d8752e117cab8baafe04dd43 Mon Sep 17 00:00:00 2001 From: Rob Aiken Date: Thu, 23 May 2024 10:24:02 +0100 Subject: [PATCH 1/4] Enable RSpec/ExampleLength --- .rubocop_todo.yml | 6 - anyintance | 124 +++++++++++++ .../dependabot/bundler/file_parser_spec.rb | 9 + .../dependabot/file_fetchers/base_spec.rb | 2 + .../file_parsers/base/dependency_set_spec.rb | 2 + .../dependabot/git_commit_checker_spec.rb | 2 + .../message_builder_spec.rb | 1 + .../dependabot/composer/file_parser_spec.rb | 11 ++ .../latest_version_finder_spec.rb | 1 + .../dependabot/docker/file_updater_spec.rb | 9 + .../github_actions/file_updater_spec.rb | 3 + .../file_updater/go_mod_updater_spec.rb | 1 + .../file_parser/property_value_finder_spec.rb | 24 +++ .../dependabot/gradle/file_updater_spec.rb | 4 + .../update_checker/version_finder_spec.rb | 17 ++ .../file_parser/repositories_finder_spec.rb | 1 + .../dependabot/maven/file_updater_spec.rb | 1 + .../update_checker/version_finder_spec.rb | 13 ++ mmh | 172 ++++++++++++++++++ .../file_parser/lockfile_parser_spec.rb | 1 + .../npm_and_yarn/file_parser_spec.rb | 49 +++++ .../file_updater/package_json_updater_spec.rb | 1 + .../npm_and_yarn/update_checker_spec.rb | 2 + nuget/spec/dependabot/nuget/version_spec.rb | 1 + .../file_parser/pipfile_files_parser_spec.rb | 1 + .../file_updater/poetry_file_updater_spec.rb | 1 + .../file_updater/pyproject_preparer_spec.rb | 3 + .../python/requirement_parser_spec.rb | 13 ++ 28 files changed, 469 insertions(+), 6 deletions(-) create mode 100644 anyintance create mode 100644 mmh diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3c06a16e31..40833649be 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -90,12 +90,6 @@ RSpec/DescribedClass: - 'updater/spec/dependabot/api_client_spec.rb' - 'updater/spec/dependabot/job_spec.rb' -# Offense count: 173 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowConsecutiveOneLiners. -RSpec/EmptyLineAfterExample: - Enabled: false - # Offense count: 25 # This cop supports safe autocorrection (--autocorrect). RSpec/EmptyLineAfterExampleGroup: diff --git a/anyintance b/anyintance new file mode 100644 index 0000000000..f43b2cef94 --- /dev/null +++ b/anyintance @@ -0,0 +1,124 @@ +Inspecting 900 files +............................C.....................................................................................C....................................................................................................................C...........C........C..................C....................................................................................................................................................................................................................C....................................................................C.......................................................................C........................................................................................................................................C...............................................................................................................C....C.................... + +Offenses: + +bundler/helpers/v1/spec/shared_contexts.rb:32:5: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Bundler::CompactIndexClient::Updater) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:214:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:224:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:273:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:287:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:744:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:777:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:803:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:846:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:861:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:965:17: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:1026:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:1074:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:1109:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +bundler/spec/dependabot/bundler/update_checker_spec.rb:1589:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::GitCommitChecker) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +common/spec/dependabot/clients/codecommit_spec.rb:32:5: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of( ... + ^^^^^^^^^^^^^^^^^^^^^^ +common/spec/dependabot/file_fetchers/base_spec.rb:40:5: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of( ... + ^^^^^^^^^^^^^^^^^^^^^^ +common/spec/dependabot/git_commit_checker_spec.rb:163:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(DummyPackageManager::MetadataFinder) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +common/spec/dependabot/git_commit_checker_spec.rb:287:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(DummyPackageManager::MetadataFinder) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +common/spec/dependabot/pull_request_creator/message_builder_spec.rb:1730:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::MetadataFinders::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +gradle/spec/dependabot/gradle/metadata_finder_spec.rb:165:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::FileFetchers::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +gradle/spec/dependabot/gradle/metadata_finder_spec.rb:188:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::FileFetchers::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +maven/spec/dependabot/maven/metadata_finder_spec.rb:115:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::FileFetchers::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +maven/spec/dependabot/maven/metadata_finder_spec.rb:138:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::FileFetchers::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +maven/spec/dependabot/maven/metadata_finder_spec.rb:155:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::FileFetchers::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +maven/spec/dependabot/maven/metadata_finder_spec.rb:194:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::FileFetchers::Base) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb:325:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(described_class::VersionResolver) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +python/spec/dependabot/python/file_updater_spec.rb:408:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Python::FileUpdater).to receive(:check_required_files).and_return(true) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/dependency_change_builder_spec.rb:146:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileUpdater).to receive(:updated_dependency_files).and_return([]) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:61:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:63:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:65:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:85:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:109:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:129:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:177:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:216:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(Dependabot::Bundler::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:278:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(DummyPackageManager::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +updater/spec/dependabot/file_fetcher_command_spec.rb:298:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. + allow_any_instance_of(DummyPackageManager::FileFetcher) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +900 files inspected, 39 offenses detected diff --git a/bundler/spec/dependabot/bundler/file_parser_spec.rb b/bundler/spec/dependabot/bundler/file_parser_spec.rb index f38b256f29..5149f78b83 100644 --- a/bundler/spec/dependabot/bundler/file_parser_spec.rb +++ b/bundler/spec/dependabot/bundler/file_parser_spec.rb @@ -182,6 +182,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:requirements) { is_expected.to eq(expected_requirements) } + its(:version) do is_expected.to eq("1530024bd6a68d36ac18e04836ce110e0d433c36") end @@ -205,6 +206,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:requirements) { is_expected.to eq(expected_requirements) } + its(:version) do is_expected.to eq("1530024bd6a68d36ac18e04836ce110e0d433c36") end @@ -228,6 +230,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:requirements) { is_expected.to eq(expected_requirements) } + its(:version) do is_expected.to eq("997d1a6ee76a1f254fd72ce16acbc8d347fcaee3") end @@ -253,6 +256,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:requirements) { is_expected.to eq(expected_requirements) } + its(:version) do is_expected.to eq("d31e445215b5af70c1604715d97dd953e868380e") end @@ -278,6 +282,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:requirements) { is_expected.to eq(expected_requirements) } + its(:version) do is_expected.to eq("d31e445215b5af70c1604715d97dd953e868380e") end @@ -362,6 +367,7 @@ let(:dependency_files) { bundler_project_dependency_files("subdependency") } its(:length) { is_expected.to eq(2) } + it "is included" do expect(dependencies.map(&:name)).to include("i18n") end @@ -371,6 +377,7 @@ let(:dependency_files) { bundler_project_dependency_files("platform_windows") } its(:length) { is_expected.to eq(1) } + it "is not included" do expect(dependencies.map(&:name)).to_not include("statesman") end @@ -760,6 +767,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("business") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to match_array(expected_requirements) end @@ -821,6 +829,7 @@ let(:dependency_files) { bundler_project_dependency_files("platform_windows_no_lockfile") } its(:length) { is_expected.to eq(1) } + it "is not included" do expect(dependencies.map(&:name)).to_not include("statesman") end diff --git a/common/spec/dependabot/file_fetchers/base_spec.rb b/common/spec/dependabot/file_fetchers/base_spec.rb index 2e6d119448..c5cba5d329 100644 --- a/common/spec/dependabot/file_fetchers/base_spec.rb +++ b/common/spec/dependabot/file_fetchers/base_spec.rb @@ -445,6 +445,7 @@ def fetch_files it { is_expected.to be_a(Dependabot::DependencyFile) } its(:content) { is_expected.to include("octokit") } its(:type) { is_expected.to include("symlink") } + its(:symlink_target) do is_expected.to include("symlinked/requirements.txt") end @@ -1470,6 +1471,7 @@ def optional it { is_expected.to be_a(Dependabot::DependencyFile) } its(:type) { is_expected.to include("symlink") } + its(:symlink_target) do is_expected.to include("symlinked/requirements.txt") end diff --git a/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb b/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb index 6c3ed8d389..30367adcb9 100644 --- a/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb +++ b/common/spec/dependabot/file_parsers/base/dependency_set_spec.rb @@ -87,6 +87,7 @@ let(:dependency_set) { described_class.new(case_sensitive: true) } it { is_expected.to be_a(described_class) } + its(:dependencies) do is_expected.to eq([existing_dependency, dependency]) end @@ -111,6 +112,7 @@ end it { is_expected.to be_a(described_class) } + its(:dependencies) do is_expected.to match_array([existing_dependency, dependency]) end diff --git a/common/spec/dependabot/git_commit_checker_spec.rb b/common/spec/dependabot/git_commit_checker_spec.rb index c26858ef25..963685082c 100644 --- a/common/spec/dependabot/git_commit_checker_spec.rb +++ b/common/spec/dependabot/git_commit_checker_spec.rb @@ -956,9 +956,11 @@ let(:upload_pack_fixture) { "business" } its([:tag]) { is_expected.to eq("v1.13.0") } + its([:commit_sha]) do is_expected.to eq("7bb4e41ce5164074a0920d5b5770d196b4d90104") end + its([:tag_sha]) do is_expected.to eq("37f41032a0f191507903ebbae8a5c0cb945d7585") end diff --git a/common/spec/dependabot/pull_request_creator/message_builder_spec.rb b/common/spec/dependabot/pull_request_creator/message_builder_spec.rb index 20f6c31ddb..74d723073a 100644 --- a/common/spec/dependabot/pull_request_creator/message_builder_spec.rb +++ b/common/spec/dependabot/pull_request_creator/message_builder_spec.rb @@ -3460,6 +3460,7 @@ def commits_details(base:, head:) it "returns a Message" do expect(message).to be_a(Dependabot::PullRequestCreator::Message) end + its(:pr_name) { is_expected.to eq(pr_name) } its(:pr_message) { is_expected.to eq(pr_message) } its(:commit_message) { is_expected.to eq(commit_message) } diff --git a/composer/spec/dependabot/composer/file_parser_spec.rb b/composer/spec/dependabot/composer/file_parser_spec.rb index 0802cba497..697bc2ced6 100644 --- a/composer/spec/dependabot/composer/file_parser_spec.rb +++ b/composer/spec/dependabot/composer/file_parser_spec.rb @@ -33,6 +33,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } its(:version) { is_expected.to eq("1.0.2") } + its(:requirements) do is_expected.to eq( [{ @@ -68,6 +69,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } its(:version) { is_expected.to eq("1.0.2") } + its(:requirements) do is_expected.to eq( [{ @@ -96,9 +98,11 @@ subject { dependencies.first } it { is_expected.to be_a(Dependabot::Dependency) } + its(:name) do is_expected.to eq("wpackagist-plugin/ga-google-analytics") end + its(:version) { is_expected.to eq("20180828") } end end @@ -116,6 +120,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } its(:version) { is_expected.to eq("1.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -196,9 +201,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } + its(:version) do is_expected.to eq("5267b03b1e4861c4657ede17a88f13ef479db482") end + its(:requirements) do is_expected.to eq( [{ @@ -276,6 +283,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("path_dep/path_dep") } its(:version) { is_expected.to eq("1.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -300,6 +308,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to eq( [{ @@ -325,6 +334,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to eq( [{ @@ -356,6 +366,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("monolog/monolog") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to eq( [{ diff --git a/composer/spec/dependabot/composer/update_checker/latest_version_finder_spec.rb b/composer/spec/dependabot/composer/update_checker/latest_version_finder_spec.rb index 6d46d1356d..cde53eab93 100644 --- a/composer/spec/dependabot/composer/update_checker/latest_version_finder_spec.rb +++ b/composer/spec/dependabot/composer/update_checker/latest_version_finder_spec.rb @@ -243,6 +243,7 @@ end it { is_expected.to eq(Gem::Version.new("2.2.0")) } + it "doesn't hit the main registry (since requested not to)" do finder.latest_version expect(WebMock).to_not have_requested(:get, packagist_url) diff --git a/docker/spec/dependabot/docker/file_updater_spec.rb b/docker/spec/dependabot/docker/file_updater_spec.rb index 3229f3299f..b383baa797 100644 --- a/docker/spec/dependabot/docker/file_updater_spec.rb +++ b/docker/spec/dependabot/docker/file_updater_spec.rb @@ -274,10 +274,12 @@ is_expected.to include "FROM python:3.10.6@sha256:8d1f943ceaaf3b3ce05df5c0926e7958836b048b" \ "700176bf9c56d8f37ac13fca AS base\n" end + its(:content) do is_expected.to include "FROM python:3.10.6-slim@sha256:c8ef926b002a8371fff6b4f40142dcc6d6f" \ "7e217f7afce2c2d1ed2e6c28e2b7c AS production\n" end + its(:content) { is_expected.to include "ENV PIP_NO_CACHE_DIR=off \\\n" } end end @@ -357,6 +359,7 @@ is_expected .to include("FROM registry-host.io:5000/myreg/ubuntu:17.10\n") end + its(:content) { is_expected.to include "RUN apt-get update" } end end @@ -395,6 +398,7 @@ is_expected .to include("FROM docker.io/myreg/ubuntu:17.10\n") end + its(:content) { is_expected.to include "RUN apt-get update" } end end @@ -524,6 +528,7 @@ is_expected.to include("FROM registry-host.io:5000/" \ "myreg/ubuntu@sha256:3ea1ca1aa") end + its(:content) { is_expected.to include "RUN apt-get update" } end end @@ -675,6 +680,7 @@ is_expected.to include "FROM --platform=$BUILDPLATFORM " \ "node:10.9-alpine AS" end + its(:content) { is_expected.to include "FROM node:10.9-alpine\n" } its(:content) { is_expected.to include "RUN apk add" } end @@ -912,6 +918,7 @@ is_expected .to include(" image: registry-host.io:5000/myreg/ubuntu:17.10\n") end + its(:content) { is_expected.to include "kind: Pod" } end end @@ -962,6 +969,7 @@ is_expected .to include(" image: docker.io/myreg/ubuntu:17.10\n") end + its(:content) { is_expected.to include "kind: Pod" } end end @@ -1110,6 +1118,7 @@ is_expected.to include("image: registry-host.io:5000/" \ "myreg/ubuntu@sha256:3ea1ca1aa") end + its(:content) { is_expected.to include "kind: Pod" } end end diff --git a/github_actions/spec/dependabot/github_actions/file_updater_spec.rb b/github_actions/spec/dependabot/github_actions/file_updater_spec.rb index 93b86128a5..be2f3e386f 100644 --- a/github_actions/spec/dependabot/github_actions/file_updater_spec.rb +++ b/github_actions/spec/dependabot/github_actions/file_updater_spec.rb @@ -376,6 +376,7 @@ expect(subject.content).to include "#{dependency.name}@#{dependency.requirements.first.dig(:source, :ref)}" expect(subject.content).not_to match(/#{old_sha}['"]?\s+#.*#{dependency.previous_version}/) end + it "updates version comment" do new_sha = dependency.requirements.first.dig(:source, :ref) expect(subject.content).not_to match(/@#{new_sha}['"]?\s+#.*#{dependency.previous_version}\s*$/) @@ -386,6 +387,7 @@ expect(subject.content).to include "# pin @v#{dependency.version}" expect(subject.content).to include "# tag=v#{dependency.version}" end + context "when previous version is older than comment" do let(:previous_version) { "2.0.0" } @@ -401,6 +403,7 @@ old_version = dependency.previous_requirements[1].dig(:source, :ref) expect(subject.content).not_to match(/@#{old_version}\s+#.*#{dependency.version}/) end + it "doesn't update version comments in the middle of sentences" do # rubocop:disable Layout/LineLength expect(subject.content).to include "Versions older than v#{dependency.previous_version} have a security vulnerability" diff --git a/go_modules/spec/dependabot/go_modules/file_updater/go_mod_updater_spec.rb b/go_modules/spec/dependabot/go_modules/file_updater/go_mod_updater_spec.rb index a8d1c46e4b..64d06fc716 100644 --- a/go_modules/spec/dependabot/go_modules/file_updater/go_mod_updater_spec.rb +++ b/go_modules/spec/dependabot/go_modules/file_updater/go_mod_updater_spec.rb @@ -71,6 +71,7 @@ it "updated the dependency" do is_expected.to include(%(rsc.io/quote v1.5.2\n)) end + it "retained the previous change" do is_expected.to include(%(rsc.io/qr v0.1.1\n)) end diff --git a/gradle/spec/dependabot/gradle/file_parser/property_value_finder_spec.rb b/gradle/spec/dependabot/gradle/file_parser/property_value_finder_spec.rb index 5480219226..fba280afaf 100644 --- a/gradle/spec/dependabot/gradle/file_parser/property_value_finder_spec.rb +++ b/gradle/spec/dependabot/gradle/file_parser/property_value_finder_spec.rb @@ -31,9 +31,11 @@ let(:property_name) { "kotlin_version" } let(:callsite_buildfile) { buildfile } its([:value]) { is_expected.to eq("1.1.4-3") } + its([:declaration_string]) do is_expected.to eq("ext.kotlin_version = '1.1.4-3'") end + its([:file]) { is_expected.to eq("build.gradle") } context "and the property name has a `project.` prefix" do @@ -54,6 +56,7 @@ context "and the property is declared with ext.name" do let(:property_name) { "kotlin_version" } its([:value]) { is_expected.to eq("1.2.61") } + its([:declaration_string]) do is_expected.to eq("ext.kotlin_version = '1.2.61'") end @@ -62,6 +65,7 @@ context "and the property is declared in an ext block" do let(:property_name) { "buildToolsVersion" } its([:value]) { is_expected.to eq("27.0.3") } + its([:declaration_string]) do is_expected.to eq("buildToolsVersion = '27.0.3'") end @@ -70,6 +74,7 @@ let(:buildfile_fixture_name) { "duplicate_property_name.gradle" } let(:property_name) { "spek_version" } its([:value]) { is_expected.to eq("2.0.6") } + its([:declaration_string]) do is_expected.to eq("spek_version = '2.0.6'") end @@ -82,6 +87,7 @@ # (i.e., before the comments are stripped out) let(:property_name) { "supportVersion" } its([:value]) { is_expected.to eq("27.1.1") } + its([:declaration_string]) do is_expected.to eq("supportVersion = '27.1.1'") end @@ -90,6 +96,7 @@ context "and the property is using findProperty syntax" do let(:property_name) { "findPropertyVersion" } its([:value]) { is_expected.to eq("27.1.1") } + its([:declaration_string]) do is_expected.to eq("findPropertyVersion = project.findProperty('findPropertyVersion') ?: '27.1.1'") end @@ -98,6 +105,7 @@ context "and the property is using hasProperty syntax" do let(:property_name) { "hasPropertyVersion" } its([:value]) { is_expected.to eq("27.1.1") } + its([:declaration_string]) do # rubocop:disable Layout/LineLength is_expected.to eq("hasPropertyVersion = project.hasProperty('hasPropertyVersion') ? project.getProperty('hasPropertyVersion') :'27.1.1'") @@ -115,12 +123,15 @@ let(:property_name) { "versions.okhttp" } its([:value]) { is_expected.to eq("3.12.1") } + its([:declaration_string]) do is_expected.to eq("okhttp : '3.12.1'") end + context "and the property is using findProperty syntax" do let(:property_name) { "versions.findPropertyVersion" } its([:value]) { is_expected.to eq("1.0.0") } + its([:declaration_string]) do is_expected.to eq("findPropertyVersion : project.findProperty('findPropertyVersion') ?: '1.0.0'") end @@ -129,6 +140,7 @@ context "and the property is using hasProperty syntax" do let(:property_name) { "versions.hasPropertyVersion" } its([:value]) { is_expected.to eq("1.0.0") } + its([:declaration_string]) do # rubocop:disable Layout/LineLength is_expected.to eq("hasPropertyVersion : project.hasProperty('hasPropertyVersion') ? project.getProperty('hasPropertyVersion') :'1.0.0'") @@ -227,9 +239,11 @@ let(:callsite_buildfile) { buildfile } its([:value]) { is_expected.to eq("1.2.61") } + its([:declaration_string]) do is_expected.to eq('extra["kotlinVersion"] = "1.2.61"') end + its([:file]) { is_expected.to eq("build.gradle.kts") } context "and the property name has a `project.` prefix" do @@ -248,6 +262,7 @@ context "and the property is declared with extra[key] = value" do let(:property_name) { "kotlinVersion" } its([:value]) { is_expected.to eq("1.2.61") } + its([:declaration_string]) do is_expected.to eq('extra["kotlinVersion"] = "1.2.61"') end @@ -256,6 +271,7 @@ context "and the property is declared with extra.set(key, value)" do let(:property_name) { "javaVersion" } its([:value]) { is_expected.to eq("11") } + its([:declaration_string]) do is_expected.to eq('extra.set("javaVersion", "11")') end @@ -264,6 +280,7 @@ context "and the property is declared in an extra.apply block" do let(:property_name) { "buildToolsVersion" } its([:value]) { is_expected.to eq("27.0.3") } + its([:declaration_string]) do is_expected.to eq('set("buildToolsVersion", "27.0.3")') end @@ -276,6 +293,7 @@ # are stripped out) let(:property_name) { "supportVersion" } its([:value]) { is_expected.to eq("27.1.1") } + its([:declaration_string]) do is_expected.to eq('set("supportVersion", "27.1.1")') end @@ -284,6 +302,7 @@ context "and the property is using findProperty syntax" do let(:property_name) { "findPropertyVersion" } its([:value]) { is_expected.to eq("27.1.1") } + its([:declaration_string]) do is_expected.to eq('set("findPropertyVersion", project.findProperty("findPropertyVersion") ?: "27.1.1")') end @@ -292,6 +311,7 @@ context "and the property is using hasProperty syntax" do let(:property_name) { "hasPropertyVersion" } its([:value]) { is_expected.to eq("27.1.1") } + its([:declaration_string]) do # rubocop:disable Layout/LineLength is_expected.to eq('set("hasPropertyVersion", if(project.hasProperty("hasPropertyVersion")) project.getProperty("hasPropertyVersion") else "27.1.1")') @@ -309,12 +329,15 @@ let(:property_name) { "versions.okhttp" } its([:value]) { is_expected.to eq("3.12.1") } + its([:declaration_string]) do is_expected.to eq('"okhttp" to "3.12.1"') end + context "and the property is using findProperty syntax" do let(:property_name) { "versions.findPropertyVersion" } its([:value]) { is_expected.to eq("1.0.0") } + its([:declaration_string]) do # rubocop:disable Layout/LineLength is_expected.to eq('"findPropertyVersion" to project.findProperty("findPropertyVersion") ?: "1.0.0"') @@ -325,6 +348,7 @@ context "and the property is using hasProperty syntax" do let(:property_name) { "versions.hasPropertyVersion" } its([:value]) { is_expected.to eq("1.0.0") } + its([:declaration_string]) do # rubocop:disable Layout/LineLength is_expected.to eq('"hasPropertyVersion" to if(project.hasProperty("hasPropertyVersion")) project.getProperty("hasPropertyVersion") else "1.0.0"') diff --git a/gradle/spec/dependabot/gradle/file_updater_spec.rb b/gradle/spec/dependabot/gradle/file_updater_spec.rb index 5032eb23b6..1fa2f8164e 100644 --- a/gradle/spec/dependabot/gradle/file_updater_spec.rb +++ b/gradle/spec/dependabot/gradle/file_updater_spec.rb @@ -75,6 +75,7 @@ "'0.6.0-SNAPSHOT', changing: true" ) end + its(:content) { is_expected.to include "version: '4.2.0'" } context "with kotlin" do @@ -85,6 +86,7 @@ 'implementation(group = "co.aikar", name = "acf-paper", version = "0.6.0-SNAPSHOT", changing: true)' ) end + its(:content) { is_expected.to include 'version = "4.2.0"' } end @@ -286,6 +288,7 @@ "'0.6.0-SNAPSHOT', changing: true" ) end + its(:content) { is_expected.to include "version: '4.2.0'" } end @@ -300,6 +303,7 @@ "'0.6.0-SNAPSHOT', changing: true" ) end + its(:content) { is_expected.to include "version: '4.2.0'" } end end diff --git a/gradle/spec/dependabot/gradle/update_checker/version_finder_spec.rb b/gradle/spec/dependabot/gradle/update_checker/version_finder_spec.rb index 21deeea6c8..dec722ee38 100644 --- a/gradle/spec/dependabot/gradle/update_checker/version_finder_spec.rb +++ b/gradle/spec/dependabot/gradle/update_checker/version_finder_spec.rb @@ -62,6 +62,7 @@ describe "#latest_version_details" do subject { finder.latest_version_details } its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -241,6 +242,7 @@ end its([:version]) { is_expected.to eq(version_class.new("27.1.1")) } + its([:source_url]) do is_expected.to eq("https://maven.google.com") end @@ -270,6 +272,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -304,6 +307,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/api/v4/groups/-/packages/maven") end @@ -323,6 +327,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -406,6 +411,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -464,6 +470,7 @@ its([:version]) do is_expected.to eq(version_class.new("2.1.4.RELEASE")) end + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -487,6 +494,7 @@ its([:version]) do is_expected.to eq(version_class.new("2.1.4.RELEASE")) end + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -532,6 +540,7 @@ end its([:version]) { is_expected.to eq(version_class.new("20.0")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -545,6 +554,7 @@ subject { versions.first } its([:version]) { is_expected.to eq(version_class.new("r03")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -554,6 +564,7 @@ subject { versions.last } its([:version]) { is_expected.to eq(version_class.new("23.7-rc1-jre")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -595,6 +606,7 @@ its([:version]) do is_expected.to eq(version_class.new("1.4.2.RELEASE")) end + its([:source_url]) do is_expected.to eq("https://plugins.gradle.org/m2") end @@ -606,6 +618,7 @@ its([:version]) do is_expected.to eq(version_class.new("2.1.4.RELEASE")) end + its([:source_url]) do is_expected.to eq("https://plugins.gradle.org/m2") end @@ -648,6 +661,7 @@ its([:version]) do is_expected.to eq(version_class.new("0.0.1-test-1")) end + its([:source_url]) do is_expected.to eq("https://plugins.gradle.org/m2") end @@ -659,6 +673,7 @@ its([:version]) do is_expected.to eq(version_class.new("1.4.30-M1")) end + its([:source_url]) do is_expected.to eq("https://plugins.gradle.org/m2") end @@ -708,6 +723,7 @@ its([:version]) do is_expected.to eq(version_class.new("28.0.0-alpha1")) end + its([:source_url]) { is_expected.to eq("https://maven.google.com") } end @@ -754,6 +770,7 @@ its([:version]) do is_expected.to eq(version_class.new("23.7-rc1-jre")) end + its([:source_url]) do is_expected.to eq("https://jcenter.bintray.com") end diff --git a/maven/spec/dependabot/maven/file_parser/repositories_finder_spec.rb b/maven/spec/dependabot/maven/file_parser/repositories_finder_spec.rb index 6e2f0b0b63..803b735084 100644 --- a/maven/spec/dependabot/maven/file_parser/repositories_finder_spec.rb +++ b/maven/spec/dependabot/maven/file_parser/repositories_finder_spec.rb @@ -30,6 +30,7 @@ it "returns the central repo URL by default" do expect(finder.central_repo_url).to eq("https://repo.maven.apache.org/maven2") end + context "if replaces-base is present" do let(:credentials) do [Dependabot::Credential.new({ diff --git a/maven/spec/dependabot/maven/file_updater_spec.rb b/maven/spec/dependabot/maven/file_updater_spec.rb index 232d5a50e1..be87ebd26b 100644 --- a/maven/spec/dependabot/maven/file_updater_spec.rb +++ b/maven/spec/dependabot/maven/file_updater_spec.rb @@ -176,6 +176,7 @@ its(:content) do is_expected.to include("1.6.0.RELEASE") end + its(:content) { is_expected.to include("0.7.9") } end diff --git a/maven/spec/dependabot/maven/update_checker/version_finder_spec.rb b/maven/spec/dependabot/maven/update_checker/version_finder_spec.rb index 47539dfa45..69e8d78c32 100644 --- a/maven/spec/dependabot/maven/update_checker/version_finder_spec.rb +++ b/maven/spec/dependabot/maven/update_checker/version_finder_spec.rb @@ -106,6 +106,7 @@ describe "#latest_version_details" do subject { finder.latest_version_details } its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -347,6 +348,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -383,6 +385,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/api/v4/groups/-/packages/maven") end @@ -402,6 +405,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -489,6 +493,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("https://private.registry.org/repo") end @@ -560,6 +565,7 @@ end its([:version]) { is_expected.to eq(version_class.new("23.6-jre")) } + its([:source_url]) do is_expected.to eq("http://repository.jboss.org/maven2") end @@ -589,6 +595,7 @@ end its([:version]) { is_expected.to eq(version_class.new("20.0")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -648,6 +655,7 @@ subject { versions.first } its([:version]) { is_expected.to eq(version_class.new("r03")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -657,6 +665,7 @@ subject { versions.last } its([:version]) { is_expected.to eq(version_class.new("23.7-rc1-jre")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -704,6 +713,7 @@ subject { versions.first } its([:version]) { is_expected.to eq(version_class.new("r03")) } + its([:source_url]) do is_expected.to eq("http://repository.jboss.org/maven2") end @@ -713,6 +723,7 @@ subject { versions.last } its([:version]) { is_expected.to eq(version_class.new("23.7-rc1-jre")) } + its([:source_url]) do is_expected.to eq("http://repository.jboss.org/maven2") end @@ -735,6 +746,7 @@ subject { versions.first } its([:version]) { is_expected.to eq(version_class.new("r01")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end @@ -744,6 +756,7 @@ subject { versions.last } its([:version]) { is_expected.to eq(version_class.new("20040616")) } + its([:source_url]) do is_expected.to eq("https://repo.maven.apache.org/maven2") end diff --git a/mmh b/mmh new file mode 100644 index 0000000000..b103fa9ef6 --- /dev/null +++ b/mmh @@ -0,0 +1,172 @@ +Inspecting 20 files +............C...C... + +Offenses: + +pub/spec/dependabot/pub/file_updater_spec.rb:12:1: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5] +RSpec.describe Dependabot::Pub::FileUpdater do ... +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/file_updater_spec.rb:84:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5] + describe "#updated_dependency_files unlock none" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/file_updater_spec.rb:101:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5] + describe "#updated_dependency_files unlock none inserts content-locks when needed" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/file_updater_spec.rb:122:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5] + describe "#updated_dependency_files unlock own" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/file_updater_spec.rb:150:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5] + describe "#updated_dependency_files unlock all" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:14:1: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] +RSpec.describe Dependabot::Pub::UpdateChecker do ... +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:113:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "given an outdated dependency, not requiring unlock" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:116:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking all" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:135:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking own" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:137:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with auto-strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:138:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "app (no version)" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:154:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "library (has version)" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:173:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with bump_versions strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:190:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with bump_versions_if_necessary strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:207:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with widen_ranges strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:227:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking none" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:243:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "will not upgrade to ignored version" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:252:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "given an outdated dependency, requiring unlock" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:255:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking all" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:257:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with auto-strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:258:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "app (no version)" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:275:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "app (version but publish_to: none)" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:293:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "library (has version)" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:312:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with bump_versions strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:330:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with bump_versions_if_necessary strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:348:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "with widen_ranges strategy" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:368:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking own" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:385:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "will not upgrade to ignored version" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:395:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking none" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:402:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "given an outdated dependency, requiring full unlock" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:405:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking all" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:445:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking own" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:452:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking none" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:459:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "given an up-to-date dependency" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:462:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking all" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:469:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking own" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:476:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking none" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:484:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + describe "#lowest_resolvable_security_fix_version" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:507:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when a newer non-vulnerable version is available" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:513:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "Can unlock transitive deps" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:554:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when the current version is not newest but also not vulnerable" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:564:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + describe "#lowest_security_fix_version" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:585:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "with a security vulnerability on older versions" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:603:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "with a security vulnerability on all newer versions" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:617:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "mono repo" do ... + ^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:620:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "unlocking none" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:629:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when raise_on_ignored is true" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:632:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when later versions are allowed" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:642:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when the user is on the latest version" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:652:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when the user is on the latest version but it's ignored" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:662:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] + context "when the user is ignoring all later versions" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:674:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [19/5] + context "With a git dependency" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:732:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [19/5] + context "with a security vulnerability on older versions" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:749:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "works for a flutter project" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +pub/spec/dependabot/pub/update_checker_spec.rb:772:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] + context "works for a flutter project requiring a flutter beta" do ... + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +20 files inspected, 55 offenses detected diff --git a/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser/lockfile_parser_spec.rb b/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser/lockfile_parser_spec.rb index 5066cca943..a331c39380 100644 --- a/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser/lockfile_parser_spec.rb +++ b/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser/lockfile_parser_spec.rb @@ -117,6 +117,7 @@ it "parses the dependencies" do expect(dependencies.map(&:name)).to contain_exactly("etag") end + # Should have the version in the lock file context "that contains dependencies with empty version" do let(:dependency_files) { project_dependency_files("pnpm/empty_version") } diff --git a/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser_spec.rb b/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser_spec.rb index a5b5b829fb..dbac769168 100644 --- a/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser_spec.rb +++ b/npm_and_yarn/spec/dependabot/npm_and_yarn/file_parser_spec.rb @@ -77,6 +77,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -99,6 +100,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.2.1") } + its(:requirements) do is_expected.to eq( [{ @@ -142,6 +144,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("hashids") } its(:version) { is_expected.to eq("1.1.4") } + its(:requirements) do is_expected.to eq( [{ @@ -164,6 +167,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("etag") } its(:version) { is_expected.to eq("1.8.1") } + its(:requirements) do is_expected.to eq( [{ @@ -188,6 +192,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to eq( [{ @@ -217,6 +222,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("chalk") } its(:version) { is_expected.to eq("2.3.0") } + its(:requirements) do is_expected.to eq( [{ @@ -238,6 +244,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("@dependabot/etag") } its(:version) { is_expected.to eq("1.8.1") } + its(:requirements) do is_expected.to eq( [{ @@ -259,6 +266,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("@dependabot/pack-core-3") } its(:version) { is_expected.to eq("2.0.14") } + its(:requirements) do is_expected.to eq( [{ @@ -305,6 +313,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("@dependabot/pack-core-4") } its(:version) { is_expected.to eq("2.0.14") } + its(:requirements) do is_expected.to eq( [{ @@ -327,6 +336,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("@dependabot/pack-core") } its(:version) { is_expected.to eq("2.0.14") } + its(:requirements) do is_expected.to eq( [{ @@ -349,6 +359,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -427,6 +438,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("@dependabot/pack-core-2") } its(:version) { is_expected.to eq("2.0.14") } + its(:requirements) do is_expected.to eq( [{ @@ -454,6 +466,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("etag") } its(:version) { is_expected.to eq("1.8.1") } + its(:requirements) do is_expected.to eq( [{ @@ -491,9 +504,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("af885e2e890b9ef0875edd2b117305119ee5bdc5") end + its(:requirements) do is_expected.to eq( [{ @@ -531,9 +546,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("d5ac0584ee9ae7bd9288220a39780f155b9ad4c8") end + its(:requirements) do is_expected.to eq( [{ @@ -578,6 +595,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } its(:version) { is_expected.to eq("2.0.2") } + its(:requirements) do is_expected.to eq( [{ @@ -627,9 +645,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("d5ac0584ee9ae7bd9288220a39780f155b9ad4c8") end + its(:requirements) do is_expected.to eq( [{ @@ -658,9 +678,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("0c6b15a88bc10cd47f67a09506399dfc9ddc075d") end + its(:requirements) do is_expected.to eq( [{ @@ -692,6 +714,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to eq( [{ @@ -714,6 +737,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } its(:version) { is_expected.to be_nil } + its(:requirements) do is_expected.to eq( [{ @@ -759,6 +783,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -784,6 +809,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -811,6 +837,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -833,6 +860,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("npm") } its(:version) { is_expected.to eq("5.8.0") } + its(:requirements) do is_expected.to eq( [{ @@ -855,6 +883,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("etag") } its(:version) { is_expected.to eq("1.8.0") } + its(:requirements) do is_expected.to eq( [{ @@ -879,6 +908,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("etag") } its(:version) { is_expected.to eq("1.7.0") } + its(:requirements) do is_expected.to eq( [{ @@ -929,6 +959,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } its(:version) { is_expected.to eq("2.0.2") } + its(:requirements) do is_expected.to eq( [{ @@ -957,6 +988,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } its(:version) { is_expected.to eq("2.0.2") } + its(:requirements) do is_expected.to eq( [{ @@ -987,6 +1019,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("chalk") } its(:version) { is_expected.to eq("2.3.0") } + its(:requirements) do is_expected.to eq( [{ @@ -1008,6 +1041,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("@dependabot/etag") } its(:version) { is_expected.to eq("1.8.0") } + its(:requirements) do is_expected.to eq( [{ @@ -1090,9 +1124,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("af885e2e890b9ef0875edd2b117305119ee5bdc5") end + its(:requirements) do is_expected.to eq( [{ @@ -1114,9 +1150,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("af885e2e890b9ef0875edd2b117305119ee5bdc5") end + its(:requirements) do is_expected.to eq( [{ @@ -1145,9 +1183,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("bull-arena") } + its(:version) do is_expected.to eq("717ae633af6429206bdc57ce994ce7e45ac48a8e") end + its(:requirements) do is_expected.to eq( [{ @@ -1174,9 +1214,11 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("is-number") } + its(:version) do is_expected.to eq("af885e2e890b9ef0875edd2b117305119ee5bdc5") end + its(:requirements) do is_expected.to eq( [{ @@ -1230,6 +1272,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:version) { is_expected.to eq("2.4.1") } + its(:requirements) do is_expected.to eq( [{ @@ -1253,6 +1296,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("etag") } its(:version) { is_expected.to eq("1.8.1") } + its(:requirements) do is_expected.to match_array( [{ @@ -1276,6 +1320,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("lodash") } its(:version) { is_expected.to eq("1.2.0") } + its(:requirements) do is_expected.to match_array( [{ @@ -1344,6 +1389,7 @@ let(:files) { project_dependency_files("yarn_berry/simple") } its(:length) { is_expected.to eq(2) } + context "with a version specified" do describe "the first dependency" do subject { top_level_dependencies.first } @@ -1351,6 +1397,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("fetch-factory") } its(:version) { is_expected.to eq("0.0.1") } + its(:requirements) do is_expected.to eq( [{ @@ -1375,6 +1422,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("etag") } its(:version) { is_expected.to eq("1.8.1") } + its(:requirements) do is_expected.to match_array( [{ @@ -1398,6 +1446,7 @@ it { is_expected.to be_a(Dependabot::Dependency) } its(:name) { is_expected.to eq("lodash") } its(:version) { is_expected.to eq("1.2.0") } + its(:requirements) do is_expected.to match_array( [{ diff --git a/npm_and_yarn/spec/dependabot/npm_and_yarn/file_updater/package_json_updater_spec.rb b/npm_and_yarn/spec/dependabot/npm_and_yarn/file_updater/package_json_updater_spec.rb index d287ef06df..7bc71f613b 100644 --- a/npm_and_yarn/spec/dependabot/npm_and_yarn/file_updater/package_json_updater_spec.rb +++ b/npm_and_yarn/spec/dependabot/npm_and_yarn/file_updater/package_json_updater_spec.rb @@ -423,6 +423,7 @@ end its(:content) { is_expected.to include '"lodash": "^1.3.1"' } + its(:content) do is_expected.to include '"etag": "file:./deps/etag"' end diff --git a/npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb b/npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb index fe5bda67b8..7f2d3c7d65 100644 --- a/npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb +++ b/npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb @@ -359,6 +359,7 @@ expect(checker.latest_version).to eq(Gem::Version.new("1.7.0")) end + it "only hits the registry once" do checker.latest_version expect(WebMock).to have_requested(:get, registry_listing_url).once @@ -1791,6 +1792,7 @@ def eq_including_metadata(expected_array) expect(updated_deps.length).to eq(2) expect(updated_deps.last.version).to eq("3.5.14") end + context "with a security advisory" do before do stub_request(:head, "#{registry_base}/#{dependency_name}/-/#{unscoped_dependency_name}-3.4.1.tgz") diff --git a/nuget/spec/dependabot/nuget/version_spec.rb b/nuget/spec/dependabot/nuget/version_spec.rb index 2f02c24ffe..a7ee942068 100644 --- a/nuget/spec/dependabot/nuget/version_spec.rb +++ b/nuget/spec/dependabot/nuget/version_spec.rb @@ -102,6 +102,7 @@ it "should equal itself #{v}" do expect(described_class.new(v)).to eq v end + it "should ignore the build identifier #{v}+build" do expect(described_class.new(v)).to eq described_class.new("#{v}+build") end diff --git a/python/spec/dependabot/python/file_parser/pipfile_files_parser_spec.rb b/python/spec/dependabot/python/file_parser/pipfile_files_parser_spec.rb index 98bc96f169..f2a8689dea 100644 --- a/python/spec/dependabot/python/file_parser/pipfile_files_parser_spec.rb +++ b/python/spec/dependabot/python/file_parser/pipfile_files_parser_spec.rb @@ -62,6 +62,7 @@ its(:name) { is_expected.to eq("certifi") } its(:version) { is_expected.to eq("2017.11.5") } its(:requirements) { is_expected.to eq([]) } + its(:subdependency_metadata) do is_expected.to eq([{ production: true }]) end diff --git a/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb b/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb index 3380fed4d2..ad8b7ad147 100644 --- a/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb +++ b/python/spec/dependabot/python/file_updater/poetry_file_updater_spec.rb @@ -113,6 +113,7 @@ requests = lockfile_obj["package"].find { |d| d["name"] == "requests" } expect(requests["version"]).to eq("2.19.1") end + it "does not change python version" do updated_pyproj = updated_files.find { |f| f.name == "pyproject.toml" } pyproj_obj = TomlRB.parse(updated_pyproj.content) diff --git a/python/spec/dependabot/python/file_updater/pyproject_preparer_spec.rb b/python/spec/dependabot/python/file_updater/pyproject_preparer_spec.rb index aeb63c114c..69f0c61833 100644 --- a/python/spec/dependabot/python/file_updater/pyproject_preparer_spec.rb +++ b/python/spec/dependabot/python/file_updater/pyproject_preparer_spec.rb @@ -157,6 +157,7 @@ let(:pyproject_fixture_name) { "dir_dependency.toml" } it { is_expected.to include("pytest = \"3.7.4\"\n") } + it "does not include the version for path deps" do expect(freeze_top_level_dependencies_except).to_not include( "path = \"../toml\"\n" \ @@ -175,6 +176,7 @@ let(:pyproject_fixture_name) { "file_dependency.toml" } it { is_expected.to include("pytest = \"3.7.4\"\n") } + it "does not include the version for path deps" do expect(freeze_top_level_dependencies_except).to_not include( "path = \"toml-8.2.54.tar.gz\"\n" \ @@ -193,6 +195,7 @@ let(:pyproject_fixture_name) { "url_dependency.toml" } it { is_expected.to include("pytest = \"6.2.4\"\n") } + it "does not include the version for url deps" do expect(freeze_top_level_dependencies_except).to_not include( "url = \"https://github.com/uiri/toml/archive/refs/tags/0.10.2.tar.gz\"\n" \ diff --git a/python/spec/dependabot/python/requirement_parser_spec.rb b/python/spec/dependabot/python/requirement_parser_spec.rb index 920053f56d..ad4c832d20 100644 --- a/python/spec/dependabot/python/requirement_parser_spec.rb +++ b/python/spec/dependabot/python/requirement_parser_spec.rb @@ -81,6 +81,7 @@ def parse(line) context "without spaces" do let(:line) { "luigi==0.1.0" } its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end @@ -89,6 +90,7 @@ def parse(line) context "with preceding v" do let(:line) { "luigi==v0.1.0" } its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end @@ -97,6 +99,7 @@ def parse(line) context "with a comment" do let(:line) { "luigi==0.1.0 # some comment" } its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end @@ -109,6 +112,7 @@ def parse(line) end its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end @@ -120,9 +124,11 @@ def parse(line) '(sys_platform == "darwin" or sys_platform == "win32") ' end its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end + its([:markers]) do is_expected.to eq 'python_version>="2.7" and ' \ '(sys_platform == "darwin" or sys_platform == "win32")' @@ -132,6 +138,7 @@ def parse(line) context "with a local version" do let(:line) { "luigi==0.1.0+gc.1" } its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0+gc.1" }] end @@ -140,9 +147,11 @@ def parse(line) context "with a hash" do let(:line) { "luigi==0.1.0 --hash=sha256:2ccb79b01769d9911" } its([:name]) { is_expected.to eq "luigi" } + its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end + its([:hashes]) do is_expected.to eq [{ algorithm: "sha256", hash: "2ccb79b01769d9911" }] end @@ -186,9 +195,11 @@ def parse(line) its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end + its([:markers]) do is_expected.to eq "python_version=='2.7'" end + its([:hashes]) do is_expected.to match_array( [ @@ -208,9 +219,11 @@ def parse(line) its([:requirements]) do is_expected.to eq [{ comparison: "==", version: "0.1.0" }] end + its([:markers]) do is_expected.to eq "python_version=='2.7'" end + its([:hashes]) do is_expected.to match_array( [ From 982c220b3f027c5c8180ab3da63adc65a72253e0 Mon Sep 17 00:00:00 2001 From: Rob Aiken Date: Thu, 23 May 2024 10:26:50 +0100 Subject: [PATCH 2/4] Enable RSpec/ExampleWording --- .rubocop_todo.yml | 14 -------------- .../file_updater/requirement_replacer_spec.rb | 2 +- .../spec/dependabot/go_modules/version_spec.rb | 2 +- nuget/spec/dependabot/nuget/version_spec.rb | 4 ++-- python/spec/dependabot/python/version_spec.rb | 4 ++-- .../spec/dependabot/swift/metadata_finder_spec.rb | 4 ++-- updater/spec/dependabot/job_spec.rb | 2 +- .../spec/dependabot/update_files_command_spec.rb | 8 ++++---- 8 files changed, 13 insertions(+), 27 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 40833649be..6725e78d2b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -126,20 +126,6 @@ RSpec/EmptyLineAfterSubject: RSpec/ExampleLength: Max: 98 -# Offense count: 13 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: CustomTransform, IgnoredWords, DisallowedExamples. -# DisallowedExamples: works -RSpec/ExampleWording: - Exclude: - - 'bundler/spec/dependabot/bundler/file_updater/requirement_replacer_spec.rb' - - 'go_modules/spec/dependabot/go_modules/version_spec.rb' - - 'nuget/spec/dependabot/nuget/version_spec.rb' - - 'python/spec/dependabot/python/version_spec.rb' - - 'swift/spec/dependabot/swift/metadata_finder_spec.rb' - - 'updater/spec/dependabot/job_spec.rb' - - 'updater/spec/dependabot/update_files_command_spec.rb' - # Offense count: 14 # This cop supports safe autocorrection (--autocorrect). RSpec/ExcessiveDocstringSpacing: diff --git a/bundler/spec/dependabot/bundler/file_updater/requirement_replacer_spec.rb b/bundler/spec/dependabot/bundler/file_updater/requirement_replacer_spec.rb index d6581bbe8e..6ba1f84119 100644 --- a/bundler/spec/dependabot/bundler/file_updater/requirement_replacer_spec.rb +++ b/bundler/spec/dependabot/bundler/file_updater/requirement_replacer_spec.rb @@ -62,7 +62,7 @@ let(:updated_requirement) { ">=3.2, <5.0" } let(:content) { %(gem "devise", "~>3.2") } - it "should include spaces between enumerated requirements" do + it "includes spaces between enumerated requirements" do is_expected.to include(%(gem "devise", ">=3.2", "<5.0")) end end diff --git a/go_modules/spec/dependabot/go_modules/version_spec.rb b/go_modules/spec/dependabot/go_modules/version_spec.rb index aae7767355..66f33f584c 100644 --- a/go_modules/spec/dependabot/go_modules/version_spec.rb +++ b/go_modules/spec/dependabot/go_modules/version_spec.rb @@ -175,7 +175,7 @@ end sorted_versions.each do |v| - it "should equal itself #{v}" do + it "equals itself #{v}" do expect(described_class.new(v)).to eq v end end diff --git a/nuget/spec/dependabot/nuget/version_spec.rb b/nuget/spec/dependabot/nuget/version_spec.rb index a7ee942068..c8241dbb06 100644 --- a/nuget/spec/dependabot/nuget/version_spec.rb +++ b/nuget/spec/dependabot/nuget/version_spec.rb @@ -99,11 +99,11 @@ end sorted_versions.each do |v| - it "should equal itself #{v}" do + it "equals itself #{v}" do expect(described_class.new(v)).to eq v end - it "should ignore the build identifier #{v}+build" do + it "ignores the build identifier #{v}+build" do expect(described_class.new(v)).to eq described_class.new("#{v}+build") end end diff --git a/python/spec/dependabot/python/version_spec.rb b/python/spec/dependabot/python/version_spec.rb index 987994cbf2..eb182eddf7 100644 --- a/python/spec/dependabot/python/version_spec.rb +++ b/python/spec/dependabot/python/version_spec.rb @@ -113,11 +113,11 @@ end sorted_versions.each do |v| - it "should equal itself #{v}" do + it "equals itself #{v}" do expect(described_class.new(v)).to eq v end end - it "should handle missing version segments" do + it "handles missing version segments" do expect(described_class.new("1")).to eq "v1.0" expect(described_class.new("1")).to eq "v1.0.0" end diff --git a/swift/spec/dependabot/swift/metadata_finder_spec.rb b/swift/spec/dependabot/swift/metadata_finder_spec.rb index 000edf33f1..974f2b37cf 100644 --- a/swift/spec/dependabot/swift/metadata_finder_spec.rb +++ b/swift/spec/dependabot/swift/metadata_finder_spec.rb @@ -43,7 +43,7 @@ ) end - it "works" do + it "returns the correct source URL" do expect(finder.source_url).to eq "https://github.com/reactivecocoa/reactiveswift" end end @@ -68,7 +68,7 @@ ) end - it "works" do + it "returns the correct source URL" do expect(finder.source_url).to eq "https://github.com/reactivecocoa/reactiveswift" end end diff --git a/updater/spec/dependabot/job_spec.rb b/updater/spec/dependabot/job_spec.rb index fcb774b823..9d765a3e72 100644 --- a/updater/spec/dependabot/job_spec.rb +++ b/updater/spec/dependabot/job_spec.rb @@ -273,7 +273,7 @@ ] end - it "should be allowed" do + it "is allowed" do dependency.metadata[:all_versions] = [ Dependabot::Dependency.new( name: dependency_name, diff --git a/updater/spec/dependabot/update_files_command_spec.rb b/updater/spec/dependabot/update_files_command_spec.rb index 532758aa88..9bc85c5121 100644 --- a/updater/spec/dependabot/update_files_command_spec.rb +++ b/updater/spec/dependabot/update_files_command_spec.rb @@ -126,7 +126,7 @@ it_behaves_like "a fast-failed job" - it "it captures the exception and records to a update job error api" do + it "captures the exception and records to a update job error api" do expect(service).to receive(:capture_exception) expect(service).to receive(:record_update_job_error).with( error_type: "update_files_error", @@ -143,7 +143,7 @@ perform_job end - it "it captures the exception and records the a update job unknown error api" do + it "captures the exception and records the a update job unknown error api" do expect(service).to receive(:capture_exception) expect(service).to receive(:record_update_job_unknown_error).with( error_type: "update_files_error", @@ -167,7 +167,7 @@ it_behaves_like "a fast-failed job" - it "it captures the exception and records to a update job error api" do + it "captures the exception and records to a update job error api" do expect(service).to receive(:capture_exception) expect(service).to receive(:record_update_job_error).with( error_type: "update_files_error", @@ -184,7 +184,7 @@ perform_job end - it "it captures the exception and does not records the update job unknown error api" do + it "captures the exception and does not records the update job unknown error api" do expect(service).to receive(:capture_exception) expect(service).to_not receive(:record_update_job_unknown_error) From 2301bfd3b8e7698a2c991ef161f64612e3fb5d33 Mon Sep 17 00:00:00 2001 From: Rob Aiken Date: Thu, 23 May 2024 12:05:40 +0100 Subject: [PATCH 3/4] removing rubocop files --- anyintance | 124 -------------------------------------- mmh | 172 ----------------------------------------------------- 2 files changed, 296 deletions(-) delete mode 100644 anyintance delete mode 100644 mmh diff --git a/anyintance b/anyintance deleted file mode 100644 index f43b2cef94..0000000000 --- a/anyintance +++ /dev/null @@ -1,124 +0,0 @@ -Inspecting 900 files -............................C.....................................................................................C....................................................................................................................C...........C........C..................C....................................................................................................................................................................................................................C....................................................................C.......................................................................C........................................................................................................................................C...............................................................................................................C....C.................... - -Offenses: - -bundler/helpers/v1/spec/shared_contexts.rb:32:5: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Bundler::CompactIndexClient::Updater) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:214:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:224:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:273:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:287:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:744:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:777:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:803:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:846:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:861:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:965:17: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:1026:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:1074:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:1109:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -bundler/spec/dependabot/bundler/update_checker_spec.rb:1589:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::GitCommitChecker) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -common/spec/dependabot/clients/codecommit_spec.rb:32:5: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of( ... - ^^^^^^^^^^^^^^^^^^^^^^ -common/spec/dependabot/file_fetchers/base_spec.rb:40:5: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of( ... - ^^^^^^^^^^^^^^^^^^^^^^ -common/spec/dependabot/git_commit_checker_spec.rb:163:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(DummyPackageManager::MetadataFinder) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -common/spec/dependabot/git_commit_checker_spec.rb:287:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(DummyPackageManager::MetadataFinder) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -common/spec/dependabot/pull_request_creator/message_builder_spec.rb:1730:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::MetadataFinders::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -gradle/spec/dependabot/gradle/metadata_finder_spec.rb:165:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::FileFetchers::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -gradle/spec/dependabot/gradle/metadata_finder_spec.rb:188:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::FileFetchers::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -maven/spec/dependabot/maven/metadata_finder_spec.rb:115:13: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::FileFetchers::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -maven/spec/dependabot/maven/metadata_finder_spec.rb:138:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::FileFetchers::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -maven/spec/dependabot/maven/metadata_finder_spec.rb:155:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::FileFetchers::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -maven/spec/dependabot/maven/metadata_finder_spec.rb:194:15: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::FileFetchers::Base) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb:325:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(described_class::VersionResolver) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -python/spec/dependabot/python/file_updater_spec.rb:408:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Python::FileUpdater).to receive(:check_required_files).and_return(true) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/dependency_change_builder_spec.rb:146:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileUpdater).to receive(:updated_dependency_files).and_return([]) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:61:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:63:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:65:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:85:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:109:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:129:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:177:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:216:9: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(Dependabot::Bundler::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:278:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(DummyPackageManager::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -updater/spec/dependabot/file_fetcher_command_spec.rb:298:11: C: RSpec/AnyInstance: Avoid stubbing using allow_any_instance_of. - allow_any_instance_of(DummyPackageManager::FileFetcher) - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -900 files inspected, 39 offenses detected diff --git a/mmh b/mmh deleted file mode 100644 index b103fa9ef6..0000000000 --- a/mmh +++ /dev/null @@ -1,172 +0,0 @@ -Inspecting 20 files -............C...C... - -Offenses: - -pub/spec/dependabot/pub/file_updater_spec.rb:12:1: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5] -RSpec.describe Dependabot::Pub::FileUpdater do ... -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/file_updater_spec.rb:84:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5] - describe "#updated_dependency_files unlock none" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/file_updater_spec.rb:101:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5] - describe "#updated_dependency_files unlock none inserts content-locks when needed" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/file_updater_spec.rb:122:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [7/5] - describe "#updated_dependency_files unlock own" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/file_updater_spec.rb:150:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [6/5] - describe "#updated_dependency_files unlock all" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:14:1: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] -RSpec.describe Dependabot::Pub::UpdateChecker do ... -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:113:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "given an outdated dependency, not requiring unlock" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:116:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking all" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:135:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking own" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:137:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with auto-strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:138:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "app (no version)" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:154:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "library (has version)" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:173:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with bump_versions strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:190:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with bump_versions_if_necessary strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:207:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with widen_ranges strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:227:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking none" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:243:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "will not upgrade to ignored version" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:252:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "given an outdated dependency, requiring unlock" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:255:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking all" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:257:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with auto-strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:258:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "app (no version)" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:275:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "app (version but publish_to: none)" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:293:9: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "library (has version)" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:312:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with bump_versions strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:330:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with bump_versions_if_necessary strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:348:7: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "with widen_ranges strategy" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:368:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking own" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:385:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "will not upgrade to ignored version" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:395:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking none" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:402:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "given an outdated dependency, requiring full unlock" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:405:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking all" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:445:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking own" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:452:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking none" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:459:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "given an up-to-date dependency" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:462:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking all" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:469:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking own" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:476:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking none" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:484:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - describe "#lowest_resolvable_security_fix_version" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:507:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when a newer non-vulnerable version is available" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:513:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "Can unlock transitive deps" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:554:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when the current version is not newest but also not vulnerable" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:564:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - describe "#lowest_security_fix_version" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:585:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "with a security vulnerability on older versions" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:603:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "with a security vulnerability on all newer versions" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:617:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "mono repo" do ... - ^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:620:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "unlocking none" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:629:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when raise_on_ignored is true" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:632:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when later versions are allowed" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:642:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when the user is on the latest version" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:652:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when the user is on the latest version but it's ignored" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:662:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [16/5] - context "when the user is ignoring all later versions" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:674:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [19/5] - context "With a git dependency" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:732:5: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [19/5] - context "with a security vulnerability on older versions" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:749:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "works for a flutter project" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -pub/spec/dependabot/pub/update_checker_spec.rb:772:3: C: RSpec/MultipleMemoizedHelpers: Example group has too many memoized helpers [17/5] - context "works for a flutter project requiring a flutter beta" do ... - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -20 files inspected, 55 offenses detected From 30e155069c6b677a57c69afce571f8d1f286210c Mon Sep 17 00:00:00 2001 From: Rob Aiken Date: Wed, 29 May 2024 16:38:58 +0100 Subject: [PATCH 4/4] lint fix --- nuget/spec/dependabot/nuget/version_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuget/spec/dependabot/nuget/version_spec.rb b/nuget/spec/dependabot/nuget/version_spec.rb index 684b823ca4..5c8de806c7 100644 --- a/nuget/spec/dependabot/nuget/version_spec.rb +++ b/nuget/spec/dependabot/nuget/version_spec.rb @@ -114,8 +114,8 @@ it "equals itself #{v}" do expect(described_class.new(v)).to eq v end - - it "should ignore the build identifier #{v}+build" do + + it "ignores the build identifier #{v}+build" do expect(described_class.new(v)).to eq described_class.new("#{v}+build") end end