summaryrefslogtreecommitdiff
path: root/spec/support/mentionable_shared_examples.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-09 23:17:03 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-10 12:11:28 +0200
commit77febe8f1e867874c10fff9f70011f7e67c1a5f8 (patch)
tree3f1bef2796453c9308844ca98f8c8dfe583714c8 /spec/support/mentionable_shared_examples.rb
parent23c99a98e1b615ac5b14f754c762ae0c355af420 (diff)
downloadgitlab-ce-77febe8f1e867874c10fff9f70011f7e67c1a5f8.tar.gz
Fixed mistake and mock warning
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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index a7f189777c8..948fff27b89 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -12,7 +12,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, target_project: mproject, source_branch: 'different' }
- let(:mentioned_commit) { mock('commit', sha: '1234567890abcdef').as_null_object }
+ let(:mentioned_commit) { double('commit', sha: '1234567890abcdef').as_null_object }
# Override to add known commits to the repository stub.
let(:extra_commits) { [] }
@@ -30,7 +30,7 @@ def common_mentionable_setup
commitmap = { '123456' => mentioned_commit }
extra_commits.each { |c| commitmap[c.sha[0..5]] = c }
- repo = mock('repository')
+ repo = double('repository')
repo.stub(:commit) { |sha| commitmap[sha] }
mproject.stub(repository: repo)