Sha256: c4efad63325f6d7cb442fc6c49fb1af35bd74fbe0c227b563e69f8957ba4c63a
Contents?: true
Size: 668 Bytes
Versions: 16
Compression:
Stored size: 668 Bytes
Contents
require 'dply/lock' module Dply describe Lock do describe "#acquire" do it "acquires an exclusive lock(flock) on the given dir" do lock = Lock.new("tmp") lock.acquire other_lock = Lock.new("tmp") expect { other_lock.acquire }.to raise_error(Error, /exclusive lock/) end specify "lock survives GC" do GC.start(full_mark: true, immediate_sweep: true) lock = Lock.new("tmp") lock.acquire GC.start(full_mark: true, immediate_sweep: true) other_lock = Lock.new("tmp") expect { other_lock.acquire }.to raise_error(Error, /exclusive lock/) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems