spec/threads_spec.rb in rufus-scheduler-3.0.7 vs spec/threads_spec.rb in rufus-scheduler-3.0.8
- old
+ new
@@ -19,11 +19,11 @@
context 'thread pool' do
it 'starts with an empty thread pool' do
- @scheduler.work_threads.size.should == 0
+ expect(@scheduler.work_threads.size).to eq(0)
end
it 'does not cross the max_work_threads threshold' do
#@scheduler.min_work_threads = 2
@@ -40,11 +40,11 @@
#@scheduler.job_threads.each do |t|
# p t.keys
# p t[:rufus_scheduler_job].class
#end
- @scheduler.work_threads.size.should == 5
+ expect(@scheduler.work_threads.size).to eq(5)
end
it 'does not cross the max_work_threads threshold (overlap: false)' do
#@scheduler.min_work_threads = 2
@@ -61,11 +61,11 @@
#@scheduler.job_threads.each do |t|
# p t.keys
# p t[:rufus_scheduler_job].class
#end
- @scheduler.work_threads.size.should == 5
+ expect(@scheduler.work_threads.size).to eq(5)
end
it 'does not execute unscheduled jobs' do
@scheduler.max_work_threads = 1
@@ -87,10 +87,10 @@
sleep(0.1) while @scheduler.work_queue.size < 1
job1.unschedule
sleep(2)
- counter.should == 1
+ expect(counter).to eq(1)
end
end
end