test/clockwork_test.rb in clockwork-3.0.0 vs test/clockwork_test.rb in clockwork-3.0.1
- old
+ new
@@ -38,11 +38,11 @@
Clockwork.every(1.minute, 'an event')
Clockwork.manager.stubs(:run_tick_loop).returns(Clockwork.manager.tick)
Clockwork.run
assert run
assert @log_output.string.include?("Triggering 'an event'")
- assert_match /Finished 'an event' duration_ms=\d+ error=nil/, @log_output.string
+ assert_match(/Finished 'an event' duration_ms=\d+ error=nil/, @log_output.string)
end
it 'should log exceptions' do
run = false
Clockwork.handler do |job|
@@ -52,10 +52,10 @@
Clockwork.every(1.minute, 'an event')
Clockwork.manager.stubs(:run_tick_loop).returns(Clockwork.manager.tick)
Clockwork.run
assert run
assert @log_output.string.include?("Triggering 'an event'")
- assert_match /Finished 'an event' duration_ms=\d+ error=#<RuntimeError: boom>/, @log_output.string
+ assert_match(/Finished 'an event' duration_ms=\d+ error=#<RuntimeError: boom>/, @log_output.string)
end
it 'should pass event without modification to handler' do
event_object = Object.new
run = false