Sha256: 037bf7eb19da0748c4c296ecd7de6db6e70f8365452ce92990192aa550177128
Contents?: true
Size: 626 Bytes
Versions: 13
Compression:
Stored size: 626 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' module OnStomp::OpenURI describe MessageQueue do let(:queue) { MessageQueue.new } describe "adding and removing items" do it "should put something onto the queue" do queue.push 'one' queue << 'two' queue.shift.should == 'one' queue.shift.should == 'two' end end describe ".shift" do it "should block until something is pushed" do Thread.new do sleep 0.1 queue << 'hello world' end queue.shift.should == 'hello world' end end end end
Version data entries
13 entries across 13 versions & 1 rubygems