test/scheduler_0_test.rb in rufus-scheduler-1.0.4 vs test/scheduler_0_test.rb in rufus-scheduler-1.0.5
- old
+ new
@@ -233,13 +233,13 @@
#
# Testing custom precision.
#
def test_scheduler_7
- scheduler = OpenWFE::Scheduler.new(:scheduler_precision => 0.100)
+ scheduler = Rufus::Scheduler.new(:scheduler_precision => 0.100)
- assert_equal scheduler.precision, 0.100
+ assert_equal 0.100, scheduler.precision
end
#
# Making sure that a job scheduled in the past is executed immediately
# and not scheduled.
@@ -247,11 +247,11 @@
# This test also makes sure that schedule_at() understands the
# time.to_s format.
#
def test_8
- scheduler = OpenWFE::Scheduler.new
+ scheduler = Rufus::Scheduler.new
scheduler.start
var = false
job_id = scheduler.schedule_at Time.now.to_s do
@@ -309,9 +309,20 @@
sleep 2
assert_equal value, 0
scheduler.stop
+ end
+
+ def test_10
+
+ e = nil
+ begin
+ OpenWFE::Scheduler.new.precision = 10
+ rescue Exception => e
+ end
+
+ assert_not_nil e, "exception not caught"
end
protected
class TestSchedulable