test/test_scheduler.rb in zhong-0.1.6 vs test/test_scheduler.rb in zhong-0.1.7
- old
+ new
@@ -42,9 +42,20 @@
end
end
end
end
+ def test_duplicate_job_name
+ boom = assert_raises RuntimeError do
+ Zhong.schedule do
+ every(1.second, "dupe_job") { nil }
+ every(1.second, "dupe_job") { nil }
+ end
+ end
+
+ assert_match(/duplicate job dupe_job/, boom.message)
+ end
+
def test_scheduler_callbacks
test_before_tick = 0
test_after_tick = 0
test_errors = 0
test_before_run = 0