Sha256: 69604c81daf0d2826740bb9475d0f39f0157cf1f20bfdff0b54eeeefc542bfd9

Contents?: true

Size: 512 Bytes

Versions: 5

Compression:

Stored size: 512 Bytes

Contents

shared_examples 'transactions' do
  it 'should mark the start of a transaction block' do
    transaction = subject.multi do
      subject.set('key1', '1')
      subject.set('key2', '2')
      subject.mget('key1', 'key2')
    end

    transaction.should eq(['OK', 'OK', ['1', '2']])
  end

  it 'should execute all command after multi' do
    subject.multi
    subject.set('key1', '1')
    subject.set('key2', '2')
    subject.mget('key1', 'key2')
    subject.exec.should be == ['OK', 'OK', ['1', '2']]
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rediska-0.0.11 spec/support/transactions.rb
rediska-0.0.10 spec/support/transactions.rb
rediska-0.0.9 spec/support/transactions.rb
rediska-0.0.8 spec/support/transactions.rb
rediska-0.0.7 spec/support/transactions.rb