Sha256: 30eea5ef16b172dbaf024756db4f19e26a58207368f15da049501d3cf0441df7

Contents?: true

Size: 595 Bytes

Versions: 1

Compression:

Stored size: 595 Bytes

Contents

require 'spec_helper'

describe PulseMeter::CommandAggregator::Sync do
  let(:ca){described_class.instance}
  let(:redis){PulseMeter.redis}

  describe "#multi" do
    it "should accumulate redis command and execute in a bulk" do
      ca.multi do
        ca.set("xxxx", "zzzz")
        ca.set("yyyy", "zzzz")
      end
      redis.get("xxxx").should == "zzzz"
      redis.get("yyyy").should == "zzzz"
    end
  end

  describe "any other redis instance method" do
    it "should be delegated to redis" do
      ca.set("xxxx", "zzzz")
      redis.get("xxxx").should == "zzzz"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pulse_meter_core-0.5.3 spec/pulse_meter/command_aggregator/sync_spec.rb