Sha256: 844637ac0dd1f781eb6602943fac4a794575ec6e2d90c79a181221da2b683275
Contents?: true
Size: 757 Bytes
Versions: 4
Compression:
Stored size: 757 Bytes
Contents
require File.dirname(__FILE__) + '/test_helper' class Resque::SchedulerTest < Test::Unit::TestCase def setup Resque::Scheduler.clear_schedule! end def test_enqueue_from_config_puts_stuff_in_the_resque_queue Resque.stubs(:enqueue).once.returns(true).with(SomeIvarJob, '/tmp') Resque::Scheduler.enqueue_from_config('cron' => "* * * * *", 'class' => 'SomeIvarJob', 'args' => "/tmp") end def test_config_makes_it_into_the_rufus_scheduler assert_equal(0, Resque::Scheduler.rufus_scheduler.all_jobs.size) Resque.schedule = {:some_ivar_job => {'cron' => "* * * * *", 'class' => 'SomeIvarJob', 'args' => "/tmp"}} Resque::Scheduler.load_schedule! assert_equal(1, Resque::Scheduler.rufus_scheduler.all_jobs.size) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
resque-scheduler-1.0.3 | test/scheduler_test.rb |
resque-scheduler-1.0.2 | test/scheduler_test.rb |
resque-scheduler-1.0.1 | test/scheduler_test.rb |
resque-scheduler-1.0.0 | test/scheduler_test.rb |