From 68658c2e3492c88e7881996c1fc349e057c9a8d7 Mon Sep 17 00:00:00 2001
From: Alex Kalderimis <akalderimis@gitlab.com>
Date: Wed, 16 Jun 2021 11:11:09 +0100
Subject: [PATCH] Use a named subject

---
 spec/models/integrations/flowdock_spec.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/spec/models/integrations/flowdock_spec.rb b/spec/models/integrations/flowdock_spec.rb
index f2d70a9d945d6..189831fa32db2 100644
--- a/spec/models/integrations/flowdock_spec.rb
+++ b/spec/models/integrations/flowdock_spec.rb
@@ -29,10 +29,11 @@
   describe "Execute" do
     let(:user)    { create(:user) }
     let(:project) { create(:project, :repository) }
-    let(:flowdock_integration) { subject }
     let(:sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) }
     let(:api_url) { 'https://api.flowdock.com/v1/messages' }
 
+    subject(:flowdock_integration) { described_class.new }
+
     before do
       allow(flowdock_integration).to receive_messages(
         project_id: project.id,
@@ -45,6 +46,7 @@
 
     it "calls FlowDock API" do
       flowdock_integration.execute(sample_data)
+
       sample_data[:commits].each do |commit|
         # One request to Flowdock per new commit
         next if commit[:id] == sample_data[:before]
-- 
GitLab