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 7350c781d0..afecfcb796 100644 --- a/common/spec/dependabot/pull_request_creator/message_builder_spec.rb +++ b/common/spec/dependabot/pull_request_creator/message_builder_spec.rb @@ -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 @@ -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