Sha256: da6515cdcfcb68e8b346b09e8e881bc3f61d980250ef772080f165910d18e6e2

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

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

class CarrotTest < Test::Unit::TestCase
  TEST_QUEUE = '_carrot_test'

  test "simple server connection" do
    c = Carrot.new
  end

  test "large messages" do
    msg = 'a' * 1024 * 1024
    q = Carrot.queue(TEST_QUEUE)
    q.publish(msg)
    assert_equal msg, q.pop
  end

  test "reset" do
    c = Carrot.new
    q = c.queue(TEST_QUEUE)
    count = q.message_count
    q.publish('test')
    c.reset
    assert_equal count + 1, q.message_count
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
secure_carrot-0.2.0 test/carrot_test.rb
secure_carrot-0.1.2 test/carrot_test.rb
secure_carrot-0.1.1 test/carrot_test.rb
secure_carrot-0.1.0 test/carrot_test.rb
carrot-0.8.0 test/carrot_test.rb