Sha256: ae55fc0828652d0131dc169f4ab03a29746e0ac70f53b69af878382765e7cd01
Contents?: true
Size: 736 Bytes
Versions: 1
Compression:
Stored size: 736 Bytes
Contents
require_relative "test_helper" class QueueTest < Scope::TestCase context "with cassandra queue" do setup do @cassandra = mock("Cassandra") ::Cassandra.stubs(:new).returns @cassandra @qid = mock "qid" @queue = CassandraQueue::Queue.get_queue(@qid) @cf = :BytesQueue @tid = mock "tuuid" SimpleUUID::UUID.stubs(:new).returns(@tid) @message = mock "message" end should "insert into cassandra when asked to" do @cassandra.expects(:insert).with(@cf, @qid, {@tid => @message}, {}) @queue.push(@message) end should "remove from cassandra when asked to" do @cassandra.expects(:remove).with(@cf, @qid, @tid, {}) @queue.remove(@tid) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cassandra-queue-0.0.1 | test/queue_test.rb |