summaryrefslogtreecommitdiff
path: root/spec/features/cycle_analytics_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/cycle_analytics_spec.rb')
-rw-r--r--spec/features/cycle_analytics_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/features/cycle_analytics_spec.rb b/spec/features/cycle_analytics_spec.rb
index 3f46772c4b0..0fc4841ee0e 100644
--- a/spec/features/cycle_analytics_spec.rb
+++ b/spec/features/cycle_analytics_spec.rb
@@ -40,7 +40,9 @@ describe 'Cycle Analytics', :js do
context "when there's cycle analytics data" do
before do
- allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue])
+ allow_next_instance_of(Gitlab::ReferenceExtractor) do |instance|
+ allow(instance).to receive(:issues).and_return([issue])
+ end
project.add_maintainer(user)
@build = create_cycle(user, project, issue, mr, milestone, pipeline)
@@ -99,7 +101,9 @@ describe 'Cycle Analytics', :js do
project.add_developer(user)
project.add_guest(guest)
- allow_any_instance_of(Gitlab::ReferenceExtractor).to receive(:issues).and_return([issue])
+ allow_next_instance_of(Gitlab::ReferenceExtractor) do |instance|
+ allow(instance).to receive(:issues).and_return([issue])
+ end
create_cycle(user, project, issue, mr, milestone, pipeline)
deploy_master(user, project)