spec/lockfile_spec.rb in rufus-scheduler-3.0.7 vs spec/lockfile_spec.rb in rufus-scheduler-3.0.8

- old
+ new

@@ -23,39 +23,39 @@ s = Rufus::Scheduler.new :lockfile => '.rufus-scheduler.lock' line = File.read('.rufus-scheduler.lock') #p line - line.should match(/pid: #{$$}/) + expect(line).to match(/pid: #{$$}/) end it '"flocks" the lock file' do s = Rufus::Scheduler.new :lockfile => '.rufus-scheduler.lock' f = File.new('.rufus-scheduler.lock', 'a') - f.flock(File::LOCK_NB | File::LOCK_EX).should == false + expect(f.flock(File::LOCK_NB | File::LOCK_EX)).to eq(false) end it 'prevents newer schedulers from starting' do s0 = Rufus::Scheduler.new :lockfile => '.rufus-scheduler.lock' s1 = Rufus::Scheduler.new :lockfile => '.rufus-scheduler.lock' - s0.started_at.should_not == nil - s1.started_at.should == nil + expect(s0.started_at).not_to eq(nil) + expect(s1.started_at).to eq(nil) end it 'releases the lockfile when shutting down' do s = Rufus::Scheduler.new :lockfile => '.rufus-scheduler.lock' s.shutdown(:kill) f = File.new('.rufus-scheduler.lock', 'a') - f.flock(File::LOCK_NB | File::LOCK_EX).should == 0 + expect(f.flock(File::LOCK_NB | File::LOCK_EX)).to eq(0) end end end