Sha256: 5743b77a669d1335c8da27a8570631823ab460a3aa08381a0d3d8206e29b1478

Contents?: true

Size: 438 Bytes

Versions: 20

Compression:

Stored size: 438 Bytes

Contents

require 'spec_helper'

describe '#watch(key [, key, ...)' do
  before do
    @key1 = 'mock-redis-test-watch1'
    @key2 = 'mock-redis-test-watch2'
  end

  it "returns 'OK'" do
    @redises.watch(@key1, @key2).should == 'OK'
  end

  it 'EXECs its MULTI on successes' do
    @redises.watch @key1, @key2 do
      @redises.multi do |multi|
        multi.set 'bar', 'baz'
      end
    end
    @redises.get('bar').should eq('baz')
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mock_redis-0.36.0 spec/commands/watch_spec.rb
mock_redis-0.35.0 spec/commands/watch_spec.rb
mock_redis-0.34.0 spec/commands/watch_spec.rb
mock_redis-0.33.0 spec/commands/watch_spec.rb
mock_redis-0.32.0 spec/commands/watch_spec.rb
mock_redis-0.31.0 spec/commands/watch_spec.rb
mock_redis-0.30.0 spec/commands/watch_spec.rb
mock_redis-0.29.0 spec/commands/watch_spec.rb
mock_redis-0.28.0 spec/commands/watch_spec.rb
mock_redis-0.27.3 spec/commands/watch_spec.rb
mock_redis-0.27.2 spec/commands/watch_spec.rb
mock_redis-0.27.1 spec/commands/watch_spec.rb
mock_redis-0.27.0 spec/commands/watch_spec.rb
mock_redis-0.26.0 spec/commands/watch_spec.rb
mock_redis-0.25.0 spec/commands/watch_spec.rb
mock_redis-0.24.0 spec/commands/watch_spec.rb
mock_redis-0.23.0 spec/commands/watch_spec.rb
mock_redis-0.22.0 spec/commands/watch_spec.rb
mock_redis-0.21.0 spec/commands/watch_spec.rb
mock_redis-0.20.0 spec/commands/watch_spec.rb