Sha256: 3ec6ce59eaf167901ddc6982fe9a9f829dc784cc3208442f3b4e230d8cbf428c

Contents?: true

Size: 718 Bytes

Versions: 3

Compression:

Stored size: 718 Bytes

Contents

require "spec_helper"

describe Agent::Queues do
  after do
    Agent::Queues.clear
  end

  it "should register queues" do
    Agent::Queues.register("foo", String, 10)
    Agent::Queues["foo"].should be_a(Agent::Queue)
    Agent::Queues["foo"].type.should == String
    Agent::Queues["foo"].max.should == 10
  end

  it "should delete queues" do
    Agent::Queues.register("foo", String, 10)
    Agent::Queues.delete("foo")
    Agent::Queues["foo"].should be_nil
  end

  it "should remove all queues queues" do
    Agent::Queues.register("foo", String, 10)
    Agent::Queues.register("bar", String, 10)
    Agent::Queues.clear
    Agent::Queues["foo"].should be_nil
    Agent::Queues["bar"].should be_nil
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
agent-0.10.0 spec/queues_spec.rb
agent-0.9.1 spec/queues_spec.rb
agent-0.9.0 spec/queues_spec.rb