Sha256: 7e66ee50cd4a6f0c2a6e28e60ab8d46104c9e74ddd4fa2c7f1b6660a42e3dc65
Contents?: true
Size: 890 Bytes
Versions: 3
Compression:
Stored size: 890 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'redis' describe "GameQueue" do before(:all) do $redis = Redis.new(:host => 'localhost', :port => 6379) GameQueue.redis = $redis GameQueue.queue_name = 'skyburg_main_queue_test' end before(:each) do $redis.del('skyburg_main_queue_test') end it "should push something" do expect { GameQueue.push(:lalaee, {pizdets: true})}.to_not raise_error end context "after push" do before(:each) do @data = {"cool" => "data", "something" => "else", "started_at" => Time.now} GameQueue.push(:event, @data) end it "should pull right data on pull" do GameQueue.pop.should == ["event", @data] end it "should delete everything on clean!" do GameQueue.push(:event, @data) GameQueue.clean! GameQueue.pop.should be_nil end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
game-queue-0.2.4 | spec/game-queue_spec.rb |
game-queue-0.2.3 | spec/game-queue_spec.rb |
game-queue-0.2.1 | spec/game-queue_spec.rb |