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:
authorJacopo <beschi.jacopo@gmail.com>2018-04-19 12:31:01 +0300
committerJacopo <beschi.jacopo@gmail.com>2018-04-19 14:56:37 +0300
commit9000626a60c889c76ff1dfc8c6247f15953ca993 (patch)
tree0d1c6fd369301b146464634b4360dd79002dac30 /spec/models/concerns
parent6ae3098eb8f01406190942e8952866dd9af81dde (diff)
Moves Uniquify counter in the initializer
Diffstat (limited to 'spec/models/concerns')
-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