mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
18 lines
352 B
Ruby
18 lines
352 B
Ruby
require_relative 'helper'
|
|
|
|
class TestMiddleware < Sidetiq::TestCase
|
|
def middleware
|
|
Sidetiq::Middleware.new
|
|
end
|
|
|
|
def test_restarts_clock
|
|
clock.stubs(:ticking?).returns(false)
|
|
clock.expects(:start!).once
|
|
middleware.call {}
|
|
|
|
clock.stubs(:ticking?).returns(true)
|
|
clock.expects(:start!).never
|
|
middleware.call {}
|
|
end
|
|
end
|
|
|