 				@RedisManager.updateDocument @doc_id, @lines, @version, @ops, {}, @callback
 
 			it "should not set the ranges", ->
-				@rclient.set
+				@multi.set
 					.calledWith("Ranges:#{@doc_id}", JSON.stringify(@ranges))
 					.should.equal false
 
 			it "should delete the ranges key", ->
-				@rclient.del
+				@multi.del
 					.calledWith("Ranges:#{@doc_id}")
 					.should.equal true
 
 		describe "with a corrupted write", ->
 			beforeEach ->
 				@badHash = "INVALID-HASH-VALUE"
-				@rclient.exec = sinon.stub().callsArgWith(0, null, [@badHash])
+				@multi.exec = sinon.stub().callsArgWith(0, null, [@badHash])
 				@RedisManager.getDocVersion.withArgs(@doc_id).yields(null, @version - @ops.length)
 				@RedisManager.updateDocument @doc_id, @lines, @version, @ops, @ranges, @callback
 


		describe "when the document is not present", ->
			beforeEach ->
				@rclient.exec = sinon.stub().callsArgWith(0, null, [null, null, null, null, null, null, null])
				@rclient.sadd = sinon.stub().yields()
				@RedisManager.getDoc @project_id, @doc_id, @callback


				@RedisManager.updateDocument @doc_id, @lines, @version, @ops, @ranges, @callback

			it "should not call multi.exec", ->
				@multi.exec.called.should.equal false

			it "should call the callback with an error", ->
				@callback
