Sha256: 8897234704d8b206a8baa502652d020c2cd3b34cac6b5585daeb8edabf82f4b5
Contents?: true
Size: 450 Bytes
Versions: 2
Compression:
Stored size: 450 Bytes
Contents
require 'minitest_helper' describe Locky do let(:locker) { Locky.new :test } it 'Test' do locker.name.must_equal :test locker.wont_be :locked? locker.lock :process_1 do locker.must_be :locked? locker.locked_by.must_equal :process_1 error = proc { locker.lock :process_2 }.must_raise Locky::Error error.message.must_equal 'test already locked by process_1' end locker.wont_be :locked? end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locky-0.0.2 | spec/locky_spec.rb |
locky-0.0.1 | spec/locky_spec.rb |