test/cron_test.rb in openwferu-0.9.10.653 vs test/cron_test.rb in openwferu-0.9.11

- old
+ new

@@ -23,28 +23,27 @@ #def teardown #end def test_cron_0 + $var = 0 - scheduler = OpenWFE::Scheduler.new() + scheduler = OpenWFE::Scheduler.new scheduler.start - sid = scheduler.schedule('* * * * *', nil, CounterSchedulable.new, nil) + sid = scheduler.schedule( + '* * * * *', + :schedulable => CounterSchedulable.new) - assert \ - sid, - "scheduler did not return a job id" + assert sid, "scheduler did not return a job id" - sleep(120) + sleep 120 scheduler.stop #puts ">#{$var}<" - assert \ - ($var == 2), - "cron_0 failed, $var is #{$var}" + assert_equal $var, 2, "$var should be at 2, it's at #{$var}" end protected class CounterSchedulable