lib/fake_sqs/queue.rb in fake_sqs-0.0.7 vs lib/fake_sqs/queue.rb in fake_sqs-0.0.8

- old
+ new

@@ -4,15 +4,17 @@ ReadCountOutOfRange = Class.new(RuntimeError) class Queue - attr_reader :name, :messages, :message_factory, :messages_in_flight + attr_reader :name, :messages, :message_factory, :messages_in_flight, :attributes def initialize(options = {}) @name = options.fetch("QueueName") @message_factory = options.fetch(:message_factory) + @attributes = {} + @attributes["QueueArn"] = "arn:aws:sqs:us-east-1:#{SecureRandom.hex}:#{@name}" reset end def send_message(options = {}) message = message_factory.new(options) @@ -40,10 +42,10 @@ result end def delete_message(receipt) - message = messages_in_flight.delete(receipt) + messages_in_flight.delete(receipt) end def reset @messages = [] @messages_in_flight = {}