Sha256: 5b789914454631a473662b255aff4c6eba07217240db82855cb1b24877fbb609

Contents?: true

Size: 684 Bytes

Versions: 18

Compression:

Stored size: 684 Bytes

Contents

Shindo.tests('Fog::Rackspace::Queues | queue', ['rackspace']) do

  service = Fog::Rackspace::Queues.new
  options = {
    :name => "fog_instance_#{Time.now.to_i.to_s}",
  }
  model_tests(service.queues, options) do

    tests('#stats').formats(QUEUE_STATS_FORMAT['messages']) do
      @instance.stats
    end

    tests('#enqueue("msg", 60)') do
      @instance.enqueue("msg", 60)
    end

    tests('#dequeue(60, 60)').returns(true) do
      @instance.dequeue(60, 60) do |message|
        returns("msg") { message.body }
      end
    end

    tests('#dequeue(60, 60) => with not messages').returns(false) do
      @instance.dequeue(60, 60) do |message|
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/rackspace/models/queues/queue_tests.rb
fog-1.24.0 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.11 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.10 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.9 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.8 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.7 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.6 tests/rackspace/models/queues/queue_tests.rb
fog-1.23.0 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.4 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.3 tests/rackspace/models/queues/queue_tests.rb
ns-fog-1.22.2 tests/rackspace/models/queues/queue_tests.rb
fog-1.22.1 tests/rackspace/models/queues/queue_tests.rb
fog-1.22.0 tests/rackspace/models/queues/queue_tests.rb
fog-1.21.0 tests/rackspace/models/queues/queue_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/rackspace/models/queues/queue_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/rackspace/models/queues/queue_tests.rb
fog-1.20.0 tests/rackspace/models/queues/queue_tests.rb