Sha256: cac64cfb1d12ecb9c12fd8717f981ca4d3690fdfc1c2a7d4f264f6cf8d04cf5a

Contents?: true

Size: 633 Bytes

Versions: 15

Compression:

Stored size: 633 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").should == "QUEUED"
        ca.set("yyyy", "zzzz").should == "QUEUED"
      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

15 entries across 15 versions & 2 rubygems

Version Path
pulse_meter_core-0.5.2 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse_meter_core-0.5.1 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse_meter_core-0.5.0 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse_meter_core-0.4.13 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.9 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.8 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.7 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.6 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.5 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.4 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.3 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.2 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.1 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.4.0 spec/pulse_meter/command_aggregator/sync_spec.rb
pulse-meter-0.3.2 spec/pulse_meter/command_aggregator/sync_spec.rb