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:
authorDouwe Maan <douwe@gitlab.com>2015-12-11 18:06:31 +0300
committerDouwe Maan <douwe@gitlab.com>2015-12-11 18:06:31 +0300
commit50f8366a8934db48d10d97de407296c026218c16 (patch)
tree3a307da7be573b5e364a15bc992bafff741d1cb7 /spec/support
parenteaecd39726701594c7b4f77ff2eec203b68c947c (diff)
parentcbeb06eb420f294b3a406f869f11de554048e93d (diff)
Merge branch 'complexity/rubocop-metrics' into 'master'
Enable rubocop metrics This enables rubocop metrics like CyclomaticComplexity and ABCSize. Initial threshold values are high, should be probably decreased. See merge request !1802
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'