From 412db1874fbf2847ad9d84e9d2344d4c4d4b9fef Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 9 Aug 2017 21:41:45 +0800 Subject: Fix some tests and report the error message --- spec/factories/merge_requests.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec/factories/merge_requests.rb') diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb index 19bf7582747..04493981945 100644 --- a/spec/factories/merge_requests.rb +++ b/spec/factories/merge_requests.rb @@ -70,10 +70,11 @@ FactoryGirl.define do after(:build) do |merge_request| target_project = merge_request.target_project + source_project = merge_request.source_project # Fake `fetch_ref` if we don't have repository # We have too many existing tests replying on this behaviour - unless target_project.repository_exists? + unless [target_project, source_project].all?(&:repository_exists?) allow(target_project.repository).to receive(:fetch_ref) end end -- cgit v1.2.1