Sha256: e84a1401d97bd0aaa087970c63726e049eb46dd13e47646a2f4db2392ad3b5de
Contents?: true
Size: 569 Bytes
Versions: 11
Compression:
Stored size: 569 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Rapnd" do before do Rapnd.config do |config| config.redis_host = 'localhost' config.redis_port = 9876 end @redis = Redis.new(:host => 'localhost', :port => 9876) end it 'enqueues a message' do Rapnd.queue('test_queue', {:alert => 'Hi!'}) @redis.llen('test_queue').should == 1 Marshal.load(@redis.lpop('test_queue')).should == {:alert => 'Hi!'} end it 'gets a redis connection' do Rapnd.redis.ping.should == "PONG" end end
Version data entries
11 entries across 11 versions & 2 rubygems