1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00
endofunky--sidetiq/test/test_middleware.rb
2013-02-04 10:54:48 +00:00

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