lib/fake_sqs/queues.rb in fake_sqs-0.3.0 vs lib/fake_sqs/queues.rb in fake_sqs-0.3.1

- old
+ new

@@ -12,15 +12,12 @@ @database = options.fetch(:database) @database.load end def create(name, options = {}) - if database[name] - fail QueueNameExists, name - else - queue = queue_factory.new(options) - database[name] = queue - end + return database[name] if database[name] + queue = queue_factory.new(options) + database[name] = queue end def delete(name, options = {}) if database[name] database.delete(name)