File tree 3 files changed +11
-13
lines changed
3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ class Bouncer
13
13
# @param [Integer] delay seconds used for debouncer
14
14
# @param [Integer] delay_buffer used to prevent race conditions
15
15
def initialize ( klass , delay : DELAY , delay_buffer : DELAY_BUFFER )
16
- unless klass . is_a? ( Class ) && klass . method_defined ?( :perform_at )
17
- raise TypeError . new ( "first argument must be a class and respond to 'perform_at'" )
18
- end
16
+ # unless klass.is_a?(Class) && klass.respond_to ?(:perform_at)
17
+ # raise TypeError.new("first argument must be a class and respond to 'perform_at'")
18
+ # end
19
19
20
20
@klass = klass
21
21
@delay = delay
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module SidekiqBouncer
4
- VERSION = '0.3.1 '
4
+ VERSION = '0.3.2 '
5
5
end
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ def self.bouncer
10
10
SidekiqBouncer ::Bouncer . new ( self )
11
11
end
12
12
13
- def perform_at ( *args )
14
- # noop
15
- end
13
+ # def self.perform_at(*args); end
16
14
end
17
15
18
16
# Tests
@@ -53,13 +51,13 @@ def perform_at(*args)
53
51
expect { described_class . new } . to raise_error ( ArgumentError )
54
52
end
55
53
56
- it 'raises TypeError when first arg is not a class' do
57
- expect { described_class . new ( 1 ) } . to raise_error ( TypeError )
58
- end
54
+ # it 'raises TypeError when first arg is not a class' do
55
+ # expect { described_class.new(1) }.to raise_error(TypeError)
56
+ # end
59
57
60
- it 'raises TypeError when first arg does not respond to perform_at' do
61
- expect { described_class . new ( String ) } . to raise_error ( TypeError )
62
- end
58
+ # it 'raises TypeError when first arg does not respond to perform_at' do
59
+ # expect { described_class.new(String) }.to raise_error(TypeError)
60
+ # end
63
61
64
62
it 'has a default value for delay' do
65
63
expect ( bouncer . delay ) . to eql ( SidekiqBouncer ::Bouncer ::DELAY )
You can’t perform that action at this time.
0 commit comments