Sha256: 6625c376b5ecf283878d6167900e76ca15321866a3551a08fbdcbbbfbc055753
Contents?: true
Size: 672 Bytes
Versions: 30
Compression:
Stored size: 672 Bytes
Contents
# quick tests for one of the support classes require 'spec_helper' describe EventCatcher do subject { EventCatcher.new } let!(:latch) { Latch.new } describe :wait_for do it %[should wake when an event is delivered] do th = Thread.new do subject.synchronize do logger.debug { "about to wait for created" } latch.release subject.wait_for_created logger.debug { "woke up, created must have been delivered" } end true end latch.await logger.debug { "th.status: #{th.status}" } subject.add(:created, 'blah') th.join(2).value.should be_true end end end
Version data entries
30 entries across 30 versions & 1 rubygems