locasms 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LocaSMS
2
- VERSION = '0.4.0'
4
+ VERSION = '0.5.0'
3
5
  end
@@ -1,39 +1,44 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'locasms/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "locasms"
8
+ spec.name = 'locasms'
8
9
  spec.version = LocaSMS::VERSION
9
- spec.authors = ["Adilson Carvalho", "Leonardo Saraiva", "Marco Carvalho"]
10
- spec.email = ["lc.adilson@gmail.com", "vyper@maneh.org", "marco.carvalho.swasthya@gmail.com"]
11
- spec.description = %q{Cliente para o serviço de disparo de SMS da LocaSMS e de sua
12
- versão para Short Code SMS (SMS Plataforma)}
13
- spec.summary = %q{Cliente para disparo de SMS, regular e Short Code, através da LocaSMS/SMS Plataforma}
14
- spec.homepage = "https://github.com/mcorp/locasms"
15
- spec.license = "MIT"
16
-
17
- spec.files = `git ls-files`.split($/)
10
+ spec.authors = ['Adilson Carvalho', 'Leonardo Saraiva', 'Marco Carvalho']
11
+ spec.email = ['lc.adilson@gmail.com', 'vyper@maneh.org', 'marco.carvalho.swasthya@gmail.com']
12
+ spec.description = 'Cliente para o serviço de disparo de SMS da LocaSMS e de sua
13
+ versão para Short Code SMS (SMS Plataforma)'
14
+ spec.summary = 'Cliente para disparo de SMS, regular e Short Code, através da LocaSMS/SMS Plataforma'
15
+ spec.homepage = 'https://github.com/mcorp/locasms'
16
+ spec.license = 'MIT'
17
+
18
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ["lib"]
21
+ spec.require_paths = ['lib']
21
22
 
22
- spec.required_ruby_version = '~> 2.0'
23
+ spec.required_ruby_version = '~> 2.4'
23
24
 
24
- spec.add_dependency 'multi_json', '~> 1.0'
25
+ spec.add_dependency 'multi_json', '~> 1.13'
25
26
 
26
- spec.add_development_dependency 'bundler', '~> 1.15'
27
- spec.add_development_dependency 'rake', '~> 12.1'
27
+ spec.add_development_dependency 'bundler'
28
+ spec.add_development_dependency 'rake', '~> 13.0'
28
29
 
29
30
  # test stuff
30
- spec.add_development_dependency 'rspec', '~> 3.6'
31
+ spec.add_development_dependency 'rspec', '~> 3.9'
31
32
  spec.add_development_dependency 'timecop', '~> 0.9'
32
33
 
33
34
  # for documentation
35
+ spec.add_development_dependency 'redcarpet', '~> 3.5'
34
36
  spec.add_development_dependency 'yard', '~> 0.9'
35
- spec.add_development_dependency 'redcarpet', '~> 3.4'
36
37
 
37
38
  # for code coverage
38
- spec.add_development_dependency 'simplecov', '~> 0.15'
39
+ spec.add_development_dependency 'simplecov', '~> 0.18'
40
+
41
+ # for code quality
42
+ spec.add_development_dependency 'rubocop', '~> 0.93'
43
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.43'
39
44
  end
@@ -1,188 +1,148 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
- describe LocaSMS::Client do
4
- let(:rest_client) { 'rest_client mock' }
5
- subject { LocaSMS::Client.new :login, :password, rest_client: rest_client, callback: nil }
5
+ describe LocaSMS::Client do # rubocop:disable RSpec/FilePath
6
+ subject(:client) { described_class.new :login, :password, rest_client: rest_client, callback: nil }
7
+
8
+ let(:rest_client) { instance_double 'RestClient' }
9
+ let(:base_args) { { msg: 'given message', numbers: '11988889991,11988889992,11988889993' } }
10
+ let(:default_callback_args) { base_args.merge(url_callback: 'default') }
11
+ let(:some_callback_args) { base_args.merge(url_callback: 'something') }
6
12
 
7
13
  describe '::ENDPOINT' do
8
- let(:domain) { LocaSMS::Client::DOMAIN }
14
+ let(:domain) { described_class::DOMAIN }
9
15
 
10
- context 'When default' do
11
- it 'Should return the default URL' do
12
- endpoint = LocaSMS::Client::ENDPOINT[subject.type]
16
+ context 'when default' do
17
+ it 'returns the default URL' do
18
+ endpoint = described_class::ENDPOINT[client.type]
13
19
  expect(endpoint).to eq("http://#{domain}/painel/api.ashx")
14
20
  end
15
21
  end
16
22
 
17
- context 'When shortcode' do
18
- subject { LocaSMS::Client.new :login, :password, type: :shortcode }
23
+ context 'when shortcode' do
24
+ subject(:client) { described_class.new :login, :password, type: :shortcode }
19
25
 
20
- it 'Should return the short code URL' do
21
- endpoint = LocaSMS::Client::ENDPOINT[subject.type]
26
+ it 'returns the short code URL' do
27
+ endpoint = described_class::ENDPOINT[client.type]
22
28
  expect(endpoint).to eq("http://#{domain}/shortcode/api.ashx")
23
29
  end
24
30
  end
25
31
  end
26
32
 
27
33
  describe '.initialize' do
28
- it { expect(subject.login).to be(:login) }
29
- it { expect(subject.password).to be(:password) }
34
+ it { expect(client.login).to be(:login) }
35
+ it { expect(client.password).to be(:password) }
30
36
  end
31
37
 
32
38
  describe '#deliver' do
33
- it 'Should send SMS' do
34
- expect(subject).to receive(:numbers)
35
- .once
36
- .with([:a, :b, :c])
37
- .and_return('XXX')
38
-
39
- expect(rest_client).to receive(:get)
40
- .once
41
- .with(:sendsms, msg: 'given message', numbers:'XXX', url_callback: nil)
42
- .and_return({})
43
-
44
- subject.deliver 'given message', :a, :b, :c
39
+ it 'sends SMS' do
40
+ allow(rest_client).to receive(:get).and_return({})
41
+
42
+ client.deliver 'given message', '11988889991', '11988889992', '11988889993'
43
+
44
+ expect(rest_client).to have_received(:get).once.with(:sendsms, base_args.merge(url_callback: nil))
45
45
  end
46
46
 
47
- it 'Should not send SMS' do
48
- expect(subject).to receive(:numbers)
49
- .once
50
- .with([:a, :b, :c])
51
- .and_raise(LocaSMS::Exception)
47
+ context 'when receive an error' do
48
+ let(:wrong_deliver) { -> { client.deliver('given message', '1', '2', '3') } }
52
49
 
53
- expect(rest_client).to receive(:get).never
50
+ it { expect(wrong_deliver).to raise_error(LocaSMS::Exception) }
54
51
 
55
- expect { subject.deliver('given message', :a, :b, :c) }.to raise_error(LocaSMS::Exception)
52
+ it 'does not send SMS' do
53
+ allow(rest_client).to receive(:get)
54
+
55
+ wrong_deliver
56
+
57
+ expect(rest_client).not_to have_received(:get)
58
+ end
56
59
  end
57
60
 
58
- context 'with callback option' do
59
- context 'callback given as arg to #deliver' do
60
- it 'uses specific callback' do
61
- expect(subject).to receive(:numbers)
62
- .once
63
- .with([:a, :b, :c])
64
- .and_return('XXX')
65
-
66
- expect(rest_client).to receive(:get)
67
- .once
68
- .with(:sendsms, msg: 'given message', numbers:'XXX', url_callback: 'something')
69
- .and_return({})
70
-
71
- subject.deliver 'given message', :a, :b, :c, url_callback: 'something'
72
- end
61
+ context 'when callback given as arg to #deliver' do
62
+ it 'uses specific callback' do
63
+ allow(rest_client).to receive(:get).and_return({})
64
+
65
+ client.deliver 'given message', '11988889991', '11988889992', '11988889993', url_callback: 'something'
66
+
67
+ expect(rest_client).to have_received(:get).once.with(:sendsms, some_callback_args)
73
68
  end
69
+ end
74
70
 
75
- it 'uses default callback' do
76
- client = LocaSMS::Client.new :login, :password, rest_client: rest_client, url_callback: 'default'
71
+ it 'uses default callback' do
72
+ client = described_class.new :login, :password, rest_client: rest_client, url_callback: 'default'
77
73
 
78
- expect(client).to receive(:numbers)
79
- .once
80
- .with([:a, :b, :c])
81
- .and_return('XXX')
74
+ allow(rest_client).to receive(:get).and_return({})
82
75
 
83
- expect(rest_client).to receive(:get)
84
- .once
85
- .with(:sendsms, msg: 'given message', numbers:'XXX', url_callback: 'default')
86
- .and_return({})
76
+ client.deliver 'given message', '11988889991', '11988889992', '11988889993'
87
77
 
88
- client.deliver 'given message', :a, :b, :c
89
- end
78
+ expect(rest_client).to have_received(:get).once.with(:sendsms, default_callback_args)
90
79
  end
91
80
  end
92
81
 
93
82
  describe '#deliver_at' do
94
- it 'Should send SMS' do
95
- expect(subject).to receive(:numbers)
96
- .once
97
- .with([:a, :b, :c])
98
- .and_return('XXX')
99
-
100
- expect(LocaSMS::Helpers::DateTimeHelper).to receive(:split)
101
- .once
102
- .with(:datetime)
103
- .and_return(%w[date time])
104
-
105
- expect(rest_client).to receive(:get)
106
- .once
107
- .with(:sendsms, msg: 'given message', numbers:'XXX', jobdate: 'date', jobtime: 'time', url_callback: nil)
108
- .and_return({})
109
-
110
- subject.deliver_at 'given message', :datetime, :a, :b, :c
83
+ let(:base_args) do
84
+ {
85
+ msg: 'given message',
86
+ numbers: '11988889991,11988889992,11988889993',
87
+ jobdate: '10/10/2020',
88
+ jobtime: '10:10'
89
+ }
111
90
  end
112
91
 
113
- it 'Should not send SMS' do
114
- expect(subject).to receive(:numbers)
115
- .once
116
- .with([:a, :b, :c])
117
- .and_raise(LocaSMS::Exception)
92
+ it 'sends SMS' do
93
+ allow(rest_client).to receive(:get).and_return({})
118
94
 
119
- expect(LocaSMS::Helpers::DateTimeHelper).to receive(:split)
120
- .once
121
- .with(:datetime)
122
- .and_return(%w[date time])
95
+ client.deliver_at 'given message', '2020-10-10 10:10', '11988889991', '11988889992', '11988889993'
123
96
 
124
- expect(rest_client).to receive(:get).never
97
+ expect(rest_client).to have_received(:get).once.with(:sendsms, base_args.merge(url_callback: nil))
98
+ end
99
+
100
+ context 'when receive an error' do
101
+ let(:wrong_deliver_at) { -> { client.deliver_at('given message', '2020-10-10 10:10', '1', '2', '3') } }
102
+
103
+ it { expect(wrong_deliver_at).to raise_error(LocaSMS::Exception) }
125
104
 
126
- expect { subject.deliver_at('given message', :datetime, :a, :b, :c) }.to raise_error(LocaSMS::Exception)
105
+ it 'does not send SMS' do
106
+ allow(rest_client).to receive(:get)
107
+
108
+ wrong_deliver_at
109
+
110
+ expect(rest_client).not_to have_received(:get)
111
+ end
127
112
  end
128
113
 
129
114
  context 'with callback option' do
130
- context 'callback given as arg to #deliver' do
131
- it 'uses specific callback' do
132
- expect(subject).to receive(:numbers)
133
- .once
134
- .with([:a, :b, :c])
135
- .and_return('XXX')
136
-
137
- expect(LocaSMS::Helpers::DateTimeHelper).to receive(:split)
138
- .once
139
- .with(:datetime)
140
- .and_return(%w[date time])
141
-
142
- expect(rest_client).to receive(:get)
143
- .once
144
- .with(:sendsms, msg: 'given message', numbers:'XXX', jobdate: 'date', jobtime: 'time', url_callback: 'something')
145
- .and_return({})
146
-
147
- subject.deliver_at 'given message', :datetime, :a, :b, :c, url_callback: 'something'
148
- end
115
+ it 'when callback given as arg to #deliver' do
116
+ allow(rest_client).to receive(:get).and_return({})
117
+
118
+ client.deliver_at 'given message', '2020-10-10 10:10', '11988889991', '11988889992', '11988889993', url_callback: 'something'
119
+
120
+ expect(rest_client).to have_received(:get).once.with(:sendsms, some_callback_args)
149
121
  end
150
122
 
151
123
  it 'uses default callback' do
152
- client = LocaSMS::Client.new :login, :password, rest_client: rest_client, url_callback: 'default'
153
-
154
- expect(client).to receive(:numbers)
155
- .once
156
- .with([:a, :b, :c])
157
- .and_return('XXX')
124
+ client = described_class.new :login, :password, rest_client: rest_client, url_callback: 'default'
158
125
 
159
- expect(LocaSMS::Helpers::DateTimeHelper).to receive(:split)
160
- .once
161
- .with(:datetime)
162
- .and_return(%w[date time])
126
+ allow(rest_client).to receive(:get).and_return({})
163
127
 
164
- expect(rest_client).to receive(:get)
165
- .once
166
- .with(:sendsms, msg: 'given message', numbers:'XXX', jobdate: 'date', jobtime: 'time', url_callback: 'default')
167
- .and_return({})
128
+ client.deliver_at 'given message', '2020-10-10 10:10', '11988889991', '11988889992', '11988889993'
168
129
 
169
- client.deliver_at 'given message', :datetime, :a, :b, :c
130
+ expect(rest_client).to have_received(:get).once.with(:sendsms, default_callback_args)
170
131
  end
171
132
  end
172
133
  end
173
134
 
174
135
  describe '#balance' do
175
- it 'Should check param assignment' do
176
- expect(rest_client).to receive(:get)
177
- .once
178
- .with(:getbalance)
179
- .and_return({})
136
+ it 'checks param assignment' do
137
+ allow(rest_client).to receive(:get).and_return({})
180
138
 
181
- subject.balance
139
+ client.balance
140
+
141
+ expect(rest_client).to have_received(:get).once.with(:getbalance)
182
142
  end
183
143
  end
184
144
 
185
- context 'Testing all campaign based methods' do
145
+ context 'when receive all campaign based methods' do
186
146
  def check_for(method)
187
147
  rest_method = {
188
148
  campaign_status: :getstatus,
@@ -190,19 +150,17 @@ describe LocaSMS::Client do
190
150
  campaign_release: :releasesms
191
151
  }[method]
192
152
 
193
- expect(rest_client).to receive(:get)
194
- .once
195
- .with(rest_method, id: '12345')
196
- .and_return({})
153
+ allow(rest_client).to receive(:get).and_return({})
154
+
155
+ client.send method, '12345'
197
156
 
198
- subject.send method, '12345'
157
+ expect(rest_client).to have_received(:get).once.with(rest_method, id: '12345')
199
158
  end
200
159
 
201
- it{ check_for :campaign_status }
202
- it{ check_for :campaign_hold }
203
- it{ check_for :campaign_release }
160
+ it { check_for :campaign_status }
161
+ it { check_for :campaign_hold }
162
+ it { check_for :campaign_release }
204
163
 
205
- it 'Should have tests to cover campaign_status csv result'
164
+ it 'has tests to cover campaign_status csv result'
206
165
  end
207
-
208
166
  end
@@ -1,50 +1,26 @@
1
- require 'spec_helper'
2
-
3
- describe LocaSMS::Helpers::DateTimeHelper do
4
- subject { LocaSMS::Helpers::DateTimeHelper }
5
-
6
- describe '#parse' do
7
- it 'Should call the class method' do
8
- expect(subject).to receive(:parse)
9
- .once
10
- .with(:value)
11
-
12
- subject.new.parse(:value)
13
- end
14
- end
1
+ # frozen_string_literal: true
15
2
 
16
- describe '#split' do
17
- it 'Should call the class method' do
18
- expect(subject).to receive(:split)
19
- .once
20
- .with(:value)
3
+ require 'spec_helper'
21
4
 
22
- subject.new.split(:value)
23
- end
24
- end
5
+ describe LocaSMS::Helpers::DateTimeHelper do # rubocop:disable RSpec/FilePath
6
+ subject(:helper) { described_class }
25
7
 
26
8
  describe '.parse' do
27
9
  let(:expected) { Time.parse '1977-03-14 14:12:00' }
28
10
 
29
11
  def try_for(value)
30
- subject.parse(value) == expected
12
+ helper.parse(value) == expected
31
13
  end
32
14
 
33
15
  it { try_for DateTime.parse('1977-03-14 14:12:00') }
34
- it { try_for Time.parse('1977-03-14 14:12:00') }
35
- it { try_for '1977-03-14 14:12:00' }
36
- it { try_for 227207520 }
16
+ it { try_for Time.parse('1977-03-14 14:12:00') }
17
+ it { try_for '1977-03-14 14:12:00' }
18
+ it { try_for 227_207_520 }
37
19
  end
38
20
 
39
21
  describe '.split' do
40
- it 'Should break a date into date and time' do
41
- expect(subject).to receive(:parse)
42
- .once
43
- .with(:datetime)
44
- .and_return(Time.parse('1977-03-14 14:12:00'))
45
-
46
- expect(subject.split(:datetime)).to eq(%w(14/03/1977 14:12))
22
+ it 'breaks a date into date and time' do
23
+ expect(helper.split('1977-03-14 14:12:00')).to eq(%w[14/03/1977 14:12])
47
24
  end
48
25
  end
49
-
50
- end
26
+ end
@@ -1,106 +1,92 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
- describe LocaSMS::Numbers do
4
- subject { LocaSMS::Numbers.new }
5
-
6
- describe '.initialize' do
7
- subject do
8
- expect_any_instance_of(LocaSMS::Numbers).
9
- to receive(:evaluate).
10
- once.
11
- with([:numbers]).
12
- and_return(good: [1, 3], bad: [2, 4])
13
- LocaSMS::Numbers.new :numbers
14
- end
5
+ describe LocaSMS::Numbers do # rubocop:disable RSpec/FilePath
6
+ subject(:number_sanitizer) { described_class.new numbers }
15
7
 
16
- it { expect(subject.good).to eq([1, 3]) }
17
- it { expect(subject.bad).to eq([2, 4]) }
18
- end
8
+ let(:numbers) { '1188889999' }
19
9
 
20
10
  describe '#normalize' do
21
- it do
22
- expect(subject.normalize('+55 (11) 8888-9999')).to(
23
- eq(%w(551188889999))
11
+ it do
12
+ expect(number_sanitizer.normalize('+55 (11) 8888-9999')).to(
13
+ eq(%w[551188889999])
24
14
  )
25
15
  end
16
+
26
17
  it do
27
- expect(subject.normalize('55', ['11', '22'])).to(
28
- eq(%w(55 11 22))
18
+ expect(number_sanitizer.normalize('55', %w[11 22])).to(
19
+ eq(%w[55 11 22])
29
20
  )
30
21
  end
22
+
31
23
  it do
32
- expect(subject.normalize(['55', 'ZZ', '22'])).to(
33
- eq(%w(55 ZZ 22))
24
+ expect(number_sanitizer.normalize(%w[55 ZZ 22])).to(
25
+ eq(%w[55 ZZ 22])
34
26
  )
35
27
  end
28
+
36
29
  it do
37
- expect(subject.normalize('55,44,33', ['ZZ', '22,11'])).to(
38
- eq(%w(55 44 33 ZZ 22 11))
30
+ expect(number_sanitizer.normalize('55,44,33', ['ZZ', '22,11'])).to(
31
+ eq(%w[55 44 33 ZZ 22 11])
39
32
  )
40
33
  end
41
- it do
42
- expect(subject.normalize(55, [11, 22])).to(
43
- eq(%w(55 11 22))
34
+
35
+ it do
36
+ expect(number_sanitizer.normalize(55, [11, 22])).to(
37
+ eq(%w[55 11 22])
44
38
  )
45
39
  end
46
- it { expect(subject.normalize('Z')).to eq(['Z']) }
47
- it { expect(subject.normalize(nil)).to eq([]) }
40
+
41
+ it { expect(number_sanitizer.normalize('Z')).to eq(['Z']) }
42
+ it { expect(number_sanitizer.normalize(nil)).to eq([]) }
48
43
  end
49
44
 
50
45
  describe '#valid_number?' do
51
- it { expect(subject.valid_number?('+55 (11) 8888-9999')).to be_falsey }
52
- it { expect(subject.valid_number?('88889999')).to be_falsey }
53
- it { expect(subject.valid_number?('988889999')).to be_falsey }
54
- it { expect(subject.valid_number?('ABC')).to be_falsey }
55
- it { expect(subject.valid_number?('')).to be_falsey }
56
- it { expect(subject.valid_number?(nil)).to be_falsey }
57
-
58
- it { expect(subject.valid_number?('1188889999')).to be_truthy }
59
- it { expect(subject.valid_number?('11988889999')).to be_truthy }
46
+ it { is_expected.not_to be_valid_number('+55 (11) 8888-9999') }
47
+ it { is_expected.not_to be_valid_number('88889999') }
48
+ it { is_expected.not_to be_valid_number('988889999') }
49
+ it { is_expected.not_to be_valid_number('ABC') }
50
+ it { is_expected.not_to be_valid_number('') }
51
+ it { is_expected.not_to be_valid_number(nil) }
52
+
53
+ it { is_expected.to be_valid_number('1188889999') }
54
+ it { is_expected.to be_valid_number('11988889999') }
60
55
  end
61
56
 
62
57
  describe '#evaluate' do
63
- it 'Should separate numbers in good and bad' do
64
- expect(subject).to receive(:normalize).
65
- once.
66
- with([:numbers]).
67
- and_return([:good, :bad])
68
- expect(subject).to receive(:valid_number?).
69
- once.
70
- with(:good).
71
- and_return(true)
72
- expect(subject).to receive(:valid_number?).
73
- once.
74
- with(:bad).
75
- and_return(false)
76
- expect(subject.evaluate(:numbers)).to(
77
- eq(good: [:good], bad: [:bad])
78
- )
58
+ it 'separates numbers in good and bad' do
59
+ expect(number_sanitizer.evaluate('11988889999', 'abc')).to eq(good: ['11988889999'], bad: ['abc'])
79
60
  end
80
61
  end
81
62
 
82
63
  describe '#bad?' do
83
- it do
84
- expect(subject).to receive(:bad).once.and_return([ ])
85
- expect(subject.bad?).to be_falsey
64
+ subject(:number_sanitizer) { described_class.new numbers }
65
+
66
+ context 'when bad is empty' do
67
+ let(:numbers) { '11988889999' }
68
+
69
+ it { expect(number_sanitizer).not_to be_bad }
86
70
  end
87
- it do
88
- expect(subject).to receive(:bad).once.and_return([1])
89
- expect(subject.bad?).to be_truthy
71
+
72
+ context 'when bad has items' do
73
+ let(:numbers) { 'ABC' }
74
+
75
+ it { expect(number_sanitizer).to be_bad }
90
76
  end
91
77
  end
92
78
 
93
79
  describe '#to_s' do
94
- it 'Should return and empty string' do
95
- expect(subject.to_s).to eq('')
80
+ context 'when is empty returns empty string' do
81
+ let(:numbers) { '' }
82
+
83
+ it { expect(number_sanitizer.to_s).to eq('') }
96
84
  end
97
85
 
98
- it 'Should return all good numbers in a string comma separated' do
99
- expect(subject).to receive(:good).
100
- once.
101
- and_return([1, 2, 3, 4])
102
- expect(subject.to_s).to eq('1,2,3,4')
86
+ context 'when all good numbers returns in a string comma separated' do
87
+ let(:numbers) { %w[11988889991 11988889992 11988889993] }
88
+
89
+ it { expect(number_sanitizer.to_s).to eq('11988889991,11988889992,11988889993') }
103
90
  end
104
91
  end
105
-
106
92
  end