Skip to content

Commit

Permalink
#6016: Address RSpec/ContextMethod Rubocop violations
Browse files Browse the repository at this point in the history
  • Loading branch information
“Thavachelvam committed May 13, 2024
1 parent 184c192 commit 59380e5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 19 deletions.
11 changes: 0 additions & 11 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ RSpec/ContainExactly:
Exclude:
- 'npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
RSpec/ContextMethod:
Exclude:
- 'cargo/spec/dependabot/cargo/update_checker_spec.rb'
- 'composer/spec/dependabot/composer/update_checker_spec.rb'
- 'npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker/version_resolver_spec.rb'
- 'npm_and_yarn/spec/dependabot/npm_and_yarn/update_checker_spec.rb'
- 'nuget/spec/dependabot/nuget/update_checker/compatibility_checker_spec.rb'
- 'python/spec/dependabot/python/update_checker_spec.rb'

# Offense count: 2237
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
Expand Down
2 changes: 1 addition & 1 deletion cargo/spec/dependabot/cargo/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
end
end

context "#requirements_unlocked_or_can_be?" do
describe "#requirements_unlocked_or_can_be?" do
subject { checker.requirements_unlocked_or_can_be? }

it { is_expected.to eq(true) }
Expand Down
2 changes: 1 addition & 1 deletion composer/spec/dependabot/composer/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@
end
end

context "#requirements_unlocked_or_can_be?" do
describe "#requirements_unlocked_or_can_be?" do
subject { checker.requirements_unlocked_or_can_be? }

it { is_expected.to eq(true) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@
end
end

context "#dependency_updates_from_full_unlock resolves previous version" do
describe "#dependency_updates_from_full_unlock resolves previous version" do
let(:project_name) { "npm6/exact_version_requirements_no_lockfile" }
subject do
resolver.dependency_updates_from_full_unlock.first[:previous_version]
Expand Down Expand Up @@ -1811,7 +1811,7 @@
it { is_expected.to eq("0.3.0") }
end

context "#latest_resolvable_previous_version" do
describe "#latest_resolvable_previous_version" do
let(:project_name) { "npm6/exact_version_requirements_no_lockfile" }
subject do
resolver.latest_resolvable_previous_version(latest_allowable_version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@
end
end

context "#requirements_unlocked_or_can_be?" do
describe "#requirements_unlocked_or_can_be?" do
subject { checker.requirements_unlocked_or_can_be? }

it { is_expected.to eq(true) }
Expand All @@ -1212,7 +1212,7 @@
end
end

context "#updated_dependencies_after_full_unlock" do
describe "#updated_dependencies_after_full_unlock" do
let(:dependency_files) { project_dependency_files("npm6/no_lockfile") }
let(:dependency) do
Dependabot::Dependency.new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
XML
end

context "#compatible?" do
describe "#compatible?" do
subject(:compatible) { checker.compatible?(version) }

before do
Expand Down
2 changes: 1 addition & 1 deletion python/spec/dependabot/python/update_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@
end
end

context "#requirements_unlocked_or_can_be?" do
describe "#requirements_unlocked_or_can_be?" do
subject { checker.requirements_unlocked_or_can_be? }

it { is_expected.to eq(true) }
Expand Down

0 comments on commit 59380e5

Please sign in to comment.