Sha256: 1ca306ff9904d2196591253852e9063b972363c29ad7fb7cc252324b026885ad

Contents?: true

Size: 414 Bytes

Versions: 2

Compression:

Stored size: 414 Bytes

Contents

require 'spec_helper'

module FakeRedis
  describe "TransactionsMethods" do
    before(:each) do
      @client = Redis.new
    end

    it "should mark the start of a transaction block" do
      transaction = @client.multi do
        @client.set("key1", "1")
        @client.set("key2", "2")
        @client.mget("key1", "key2")
      end

      transaction.should be == ["OK", "OK", ["1", "2"]]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fakeredis-0.4.3 spec/transactions_spec.rb
fakeredis-0.4.2 spec/transactions_spec.rb