Sha256: c13837b6c4612fb965e6b531d44c7afb7d56061a751485e1d263acceb5d0032c

Contents?: true

Size: 408 Bytes

Versions: 5

Compression:

Stored size: 408 Bytes

Contents

require 'spec_helper'

module FakeRedis
  describe "TransactionsMethods" do
    before(:each) do
      @client = FakeRedis::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 == ["1", "2"]
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fakeredis-0.1.4 spec/transactions_spec.rb
fakeredis-0.1.3 spec/transactions_spec.rb
fakeredis-0.1.2 spec/transactions_spec.rb
fakeredis-0.1.1 spec/transactions_spec.rb
fakeredis-0.1.0 spec/transactions_spec.rb