Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-27 01:37:04 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-27 01:37:04 +0400
commit9231b91a401245e44b57dbe688eeabfc45dd4bea (patch)
treeceab7084f98503c4b48c494db2d2d06e2ee3002e /spec/support/mentionable_shared_examples.rb
parentf0de4b539f493e578068bd42d23129d81acbfb63 (diff)
Fix mentionable spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/support/mentionable_shared_examples.rb')
-rw-r--r--spec/support/mentionable_shared_examples.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index 3802e94ecf0..0d67e7ee4e6 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -11,7 +11,7 @@ def common_mentionable_setup
let(:mentioned_issue) { create :issue, project: mproject }
let(:other_issue) { create :issue, project: mproject }
- let(:mentioned_mr) { create :merge_request, source_project: mproject, source_branch: 'different' }
+ let(:mentioned_mr) { create :merge_request, :simple, source_project: mproject }
let(:mentioned_commit) { double('commit', sha: '1234567890abcdef').as_null_object }
# Override to add known commits to the repository stub.
@@ -29,11 +29,7 @@ def common_mentionable_setup
# unrecognized commits.
commitmap = { '123456' => mentioned_commit }
extra_commits.each { |c| commitmap[c.sha[0..5]] = c }
-
- repo = double('repository')
- repo.stub(:commit) { |sha| commitmap[sha] }
- mproject.stub(repository: repo)
-
+ mproject.repository.stub(:commit) { |sha| commitmap[sha] }
set_mentionable_text.call(ref_string)
end
end