Sha256: 91e82afff884c1a5f62cc2e6a54e77f91b2106fc1a5c24c3b4754fb027ef778c

Contents?: true

Size: 791 Bytes

Versions: 3

Compression:

Stored size: 791 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

module RosettaQueue

  describe Destinations do

    before(:each) do
      Destinations.clear
    end
    
    after(:each) do
      Destinations.clear
    end
    
    it "should map destination to hash" do

      Destinations.define do |queue| 
        queue.map :test_queue, "/queue/test_queue"
      end
      
      Destinations.lookup(:test_queue).should == "/queue/test_queue"
    end
    
    it "#queue_names should return an array of the actuual queue names" do
      Destinations.define do |queue| 
        queue.map :foo, "/queue/foo"
        queue.map :bar, "/queue/bar"
      end
      
      Destinations.queue_names.should include("/queue/foo")
      Destinations.queue_names.should include("/queue/bar")
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
bmabey-rosetta_queue-0.1.3 spec/rosetta_queue/destinations_spec.rb
bmabey-rosetta_queue-0.2.0 spec/rosetta_queue/destinations_spec.rb
cwyckoff-rosetta_queue-0.3.3 spec/rosetta_queue/destinations_spec.rb