summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJacopo <beschi.jacopo@gmail.com>2018-04-19 11:31:01 +0200
committerJacopo <beschi.jacopo@gmail.com>2018-04-19 13:56:37 +0200
commit9000626a60c889c76ff1dfc8c6247f15953ca993 (patch)
tree0d1c6fd369301b146464634b4360dd79002dac30 /spec
parent6ae3098eb8f01406190942e8952866dd9af81dde (diff)
downloadgitlab-ce-9000626a60c889c76ff1dfc8c6247f15953ca993.tar.gz
Moves Uniquify counter in the initializer
Diffstat (limited to 'spec')
-rw-r--r--spec/models/concerns/uniquify_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/models/concerns/uniquify_spec.rb b/spec/models/concerns/uniquify_spec.rb
index 00341213bbe..6cd2de6dcce 100644
--- a/spec/models/concerns/uniquify_spec.rb
+++ b/spec/models/concerns/uniquify_spec.rb
@@ -24,7 +24,9 @@ describe Uniquify do
it 'allows to pass an initial value for the counter' do
start_counting_from = 2
- result = uniquify.string('test_string', start_counting_from) { |s| s == 'test_string' }
+ uniquify = described_class.new(start_counting_from)
+
+ result = uniquify.string('test_string') { |s| s == 'test_string' }
expect(result).to eq('test_string2')
end