spec/commands/watch_spec.rb in mock_redis-0.19.0 vs spec/commands/watch_spec.rb in mock_redis-0.20.0

- old
+ new

@@ -1,13 +1,18 @@ require 'spec_helper' -describe '#watch(key)' do +describe '#watch(key [, key, ...)' do + before do + @key1 = 'mock-redis-test-watch1' + @key2 = 'mock-redis-test-watch2' + end + it "returns 'OK'" do - @redises.watch('mock-redis-test').should == 'OK' + @redises.watch(@key1, @key2).should == 'OK' end it 'EXECs its MULTI on successes' do - @redises.watch 'foo' do + @redises.watch @key1, @key2 do @redises.multi do |multi| multi.set 'bar', 'baz' end end @redises.get('bar').should eq('baz')