Sha256: 31a32392a7502faae8446bee1e3fc36b3cfb3191dc0f119e550b0900a6f80dc6

Contents?: true

Size: 411 Bytes

Versions: 9

Compression:

Stored size: 411 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 == ["OK", "OK", ["1", "2"]]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fakeredis-0.3.3 spec/transactions_spec.rb
fakeredis-0.4.1 spec/transactions_spec.rb
fakeredis-0.4.0 spec/transactions_spec.rb
fakeredis-0.3.2 spec/transactions_spec.rb
fakeredis-0.3.1 spec/transactions_spec.rb
fakeredis-0.3.0 spec/transactions_spec.rb
fakeredis-0.2.2 spec/transactions_spec.rb
fakeredis-0.2.1 spec/transactions_spec.rb
fakeredis-0.2.0 spec/transactions_spec.rb