test/test_sidetiq.rb in sidetiq-0.4.0.rc2 vs test/test_sidetiq.rb in sidetiq-0.4.0.rc3
- old
+ new
@@ -2,24 +2,21 @@
class TestSidetiq < Sidetiq::TestCase
def test_schedules
schedules = Sidetiq.schedules
- assert_equal 2, schedules.length
+ assert_includes schedules, ScheduledWorker.schedule
+ assert_includes schedules, BackfillWorker.schedule
- assert_includes schedules.keys, ScheduledWorker
- assert_includes schedules.keys, BackfillWorker
-
- assert_kind_of Sidetiq::Schedule, schedules[ScheduledWorker]
- assert_kind_of Sidetiq::Schedule, schedules[BackfillWorker]
+ assert_kind_of Sidetiq::Schedule, ScheduledWorker.schedule
+ assert_kind_of Sidetiq::Schedule, BackfillWorker.schedule
end
def test_workers
workers = Sidetiq.workers
assert_includes workers, ScheduledWorker
assert_includes workers, BackfillWorker
- assert_equal 2, workers.length
end
def test_scheduled
SimpleWorker.perform_at(Time.local(2011, 1, 1, 1))
hash = SimpleWorker.jobs.first