summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-04 13:07:42 +0100
committerGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-08 08:43:09 +0100
commit7e9109c43bdaedb79b06ba8948cd729ac5f68deb (patch)
treefc7ccee75de94c348c3f04e536965cd3851d130e /spec/support
parent75c6b29f6b15e164717c27e6c3d7eecb84c923f8 (diff)
downloadgitlab-ce-7e9109c43bdaedb79b06ba8948cd729ac5f68deb.tar.gz
Move `common_mentionable_setup` to shared context in specs
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/mentionable_shared_examples.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index 33d2b14583c..fce91015fd4 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -4,7 +4,7 @@
# - let(:backref_text) { "the way that +subject+ should refer to itself in backreferences " }
# - let(:set_mentionable_text) { lambda { |txt| "block that assigns txt to the subject's mentionable_text" } }
-def common_mentionable_setup
+shared_context 'mentionable context' do
let(:project) { subject.project }
let(:author) { subject.author }
@@ -56,7 +56,7 @@ def common_mentionable_setup
end
shared_examples 'a mentionable' do
- common_mentionable_setup
+ include_context 'mentionable context'
it 'generates a descriptive back-reference' do
expect(subject.gfm_reference).to eq(backref_text)
@@ -88,7 +88,7 @@ shared_examples 'a mentionable' do
end
shared_examples 'an editable mentionable' do
- common_mentionable_setup
+ include_context 'mentionable context'
it_behaves_like 'a mentionable'