Skip to content

Commit

Permalink
Better example for same name test
Browse files Browse the repository at this point in the history
We expect this to happen when there are multiple versions of the same
dependency.
  • Loading branch information
mctofu committed Oct 24, 2022
1 parent e5635fa commit 126dd42
Showing 1 changed file with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,17 @@ def commits_details(base:, head:)
end

context "with two dependencies with the same name" do
let(:dependencies) { [dependency, dependency] }
let(:dependency2) do
Dependabot::Dependency.new(
name: "business",
version: "2.3.0",
previous_version: "2.1.0",
package_manager: "dummy",
requirements: [],
previous_requirements: []
)
end
let(:dependencies) { [dependency, dependency2] }
it { is_expected.to eq("Bump business") }
end

Expand Down Expand Up @@ -699,7 +709,17 @@ def commits_details(base:, head:)
end

context "with two dependencies with the same name" do
let(:dependencies) { [dependency, dependency] }
let(:dependency2) do
Dependabot::Dependency.new(
name: "business",
version: "2.3.0",
previous_version: "2.1.0",
package_manager: "dummy",
requirements: [],
previous_requirements: []
)
end
let(:dependencies) { [dependency, dependency2] }
it { is_expected.to eq("Update requirements for business") }
end

Expand Down

0 comments on commit 126dd42

Please sign in to comment.