Sha256: 9414e1568fb6058f4893d5ee0f3a7b66d23eb01ee79b9c8d702087b73fa334a7
Contents?: true
Size: 1.02 KB
Versions: 8
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' module Queuel module IronMq describe Queue do let(:message) { double "Message", body: "uhuh" } let(:client) { double "ClientObject" } let(:name) { "venues queue" } let(:queue_object_with_message) { double "QueueObject", get: message, peek: [message] } let(:queue_object_with_nil_message) { double "QueueObject", get: nil, peek: nil } subject do described_class.new client, name end it_should_behave_like "a queue" describe "size" do it "should check the queue_connection for size" do client.stub queue: queue_object_with_message queue_object_with_message.should_receive(:size) subject.size end end describe "peek" do before do not_for_null do client.stub queue: queue_object_with_message end end it "should take options and return an array" do subject.peek(option: true).should be_an Array end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems