Skip to content

Commit fb1e62c

Browse files
committed
removes redundant code
1 parent 31c4c39 commit fb1e62c

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

spec/notification_center_spec.rb

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828

2929
before(:context) do
3030
class CallBack
31-
def call(args)
32-
args
31+
def call
3332
end
3433
end
3534

@@ -106,8 +105,7 @@ def call(args)
106105
it 'should add and return notification ID when multiple
107106
valid callbacks are added for a single notification type' do
108107
class CallBackSecond
109-
def call(_args)
110-
'Test multi listner.'
108+
def call
111109
end
112110
end
113111

@@ -164,12 +162,7 @@ def call(_args)
164162
let(:notification_center) { Optimizely::NotificationCenter.new(spy_logger, raise_error_handler) }
165163
before(:example) do
166164
@inner_notification_center = notification_center
167-
class CallBackSecond
168-
def call(_args)
169-
'Test remove notification.'
170-
end
171-
end
172-
165+
173166
@callback_second = CallBackSecond.new
174167
@callback_reference_second = @callback_second.method(:call)
175168
# add a callback for multiple notification types
@@ -319,18 +312,12 @@ def call(_args)
319312
let(:notification_center) { Optimizely::NotificationCenter.new(spy_logger, raise_error_handler) }
320313
before(:example) do
321314
@inner_notification_center = notification_center
322-
class CallBackSecond
323-
def call(_args)
324-
'Test remove notification.'
325-
end
326-
end
327-
315+
328316
@callback_second = CallBackSecond.new
329317
@callback_reference_second = @callback_second.method(:call)
330318

331319
class CallBackThird
332-
def call(_args)
333-
'Test remove notification.'
320+
def call
334321
end
335322
end
336323

@@ -404,8 +391,7 @@ def deliver_two(_args)
404391
@logger.log Logger::INFO, 'delivered two.'
405392
end
406393

407-
def deliver_three(_args)
408-
@logger.log Logger::INFO, 'delivered three.'
394+
def deliver_three
409395
end
410396
end
411397
let(:raise_error_handler) { Optimizely::RaiseErrorHandler.new }

0 commit comments

Comments
 (0)