test/scheduler_3_test.rb in rufus-scheduler-1.0.11 vs test/scheduler_3_test.rb in rufus-scheduler-1.0.12
- old
+ new
@@ -5,22 +5,18 @@
# John Mettraux at openwfe.org
#
# Sun Oct 29 16:18:25 JST 2006
#
+$:.unshift(File.dirname(__FILE__) + '/../lib')
+
require 'test/unit'
require 'openwfe/util/scheduler'
class Scheduler3Test < Test::Unit::TestCase
- #def setup
- #end
-
- #def teardown
- #end
-
#
# Testing tags
#
def test_0
@@ -47,9 +43,16 @@
sleep 0.300 # let the jobs get really scheduled
assert_equal 2, scheduler.find_jobs('fish').size
#puts scheduler.find_jobs('fish')
+
+ assert_equal(
+ 3,
+ scheduler.all_jobs.size)
+ assert_equal(
+ [ "Rufus::CronJob", "Rufus::CronJob", "Rufus::AtJob" ],
+ scheduler.all_jobs.collect { |j| j.class.name })
scheduler.find_jobs('fish').each do |job|
scheduler.unschedule(job.job_id)
end