Skip to content

Commit

Permalink
Re-enabled NamedSubject RSpec rule which was accidentlaly overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
GarryHurleyJr committed Jun 19, 2024
1 parent 7723313 commit 2f7000f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ RSpec/MultipleExpectations:
RSpec/MultipleMemoizedHelpers:
Max: 30

# Offense count: 500
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Enabled: false

# Offense count: 3871
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@
end

it "returns an array of commits relevant to the given path" do
expect(subject).to contain_exactly({
expect(commits).to contain_exactly({
message: "feat: Custom persister support\n\n" \
"* feat: Custom persister support\r\n\r\n" \
"* Create a @pollyjs/persister package\r\n" \
Expand Down Expand Up @@ -1018,7 +1018,7 @@
end

it "returns an array of commits" do
expect(subject).to contain_exactly({
expect(commits).to contain_exactly({
message: "Added signature for changeset f275e318641f",
sha: "deae742eacfa985bd20f47a12a8fee6ce2e0447c",
html_url: "https://bitbucket.org/ged/ruby-pg/commits/" \
Expand Down Expand Up @@ -1065,7 +1065,7 @@
end

it "returns an array of commits" do
expect(subject).to contain_exactly({
expect(commits).to contain_exactly({
message: "Merged PR 2: Deleted README.md",
sha: "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
html_url: "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/" \
Expand Down Expand Up @@ -1102,7 +1102,7 @@
end

it "returns an array of commits" do
expect(subject).to contain_exactly({
expect(commits).to contain_exactly({
message: "Merged PR 2: Deleted README.md",
sha: "9991b4f66def4c0a9ad8f9f27043ece7eddcf1c7",
html_url: "https://dev.azure.com/fabrikam/SomeGitProject/_git/SampleRepository/commit/" \
Expand Down Expand Up @@ -1157,7 +1157,7 @@
end

it "returns an array of commits" do
expect(subject).to contain_exactly({
expect(commits).to contain_exactly({
message: "Add find command\n",
sha: "8d7d08fb9a7a439b3e6a1e6a1a34cbdb4273de87",
html_url: "https://gitlab.com/org/business/commit/" \
Expand Down
8 changes: 4 additions & 4 deletions npm_and_yarn/spec/dependabot/npm_and_yarn/requirement_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,17 @@
let(:requirement_string) { "^1.0.0 || ^2.0.0" }

it do
expect(subject).to contain_exactly(Gem::Requirement.new(">= 1.0.0", "< 2.0.0.a"),
Gem::Requirement.new(">= 2.0.0", "< 3.0.0.a"))
expect(reqs).to contain_exactly(Gem::Requirement.new(">= 1.0.0", "< 2.0.0.a"),
Gem::Requirement.new(">= 2.0.0", "< 3.0.0.a"))
end
end

context "with parentheses that do nothing" do
let(:requirement_string) { "(^1.0.0 || ^2.0.0)" }

it do
expect(subject).to contain_exactly(Gem::Requirement.new(">= 1.0.0", "< 2.0.0.a"),
Gem::Requirement.new(">= 2.0.0", "< 3.0.0.a"))
expect(reqs).to contain_exactly(Gem::Requirement.new(">= 1.0.0", "< 2.0.0.a"),
Gem::Requirement.new(">= 2.0.0", "< 3.0.0.a"))
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ def project_dependency_file(file_name)
subject(:test_subject) { builder.lockfiles }

it do
expect(subject).to contain_exactly(project_dependency_file("package-lock.json"),
project_dependency_file("yarn.lock"))
expect(test_subject).to contain_exactly(project_dependency_file("package-lock.json"),
project_dependency_file("yarn.lock"))
end

context "with shrinkwraps" do
let(:project_name) { "npm6/shrinkwrap" }

it do
expect(subject).to contain_exactly(project_dependency_file("package-lock.json"),
project_dependency_file("npm-shrinkwrap.json"))
expect(test_subject).to contain_exactly(project_dependency_file("package-lock.json"),
project_dependency_file("npm-shrinkwrap.json"))
end
end
end
Expand Down

0 comments on commit 2f7000f

Please sign in to comment.