 				@RedisManager.putDocInMemory @project_id, @doc_id, @lines, @version, {}, @pathname, done
 
 			it "should delete the ranges key", ->
-				@rclient.del
+				@multi.del
 					.calledWith("Ranges:#{@doc_id}")
 					.should.equal true
 
 			it "should not set the ranges", ->
-				@rclient.set
+				@multi.set
 					.calledWith("Ranges:#{@doc_id}", JSON.stringify(@ranges))
 					.should.equal false
 
 		describe "with a corrupted write", ->
 			beforeEach (done) ->
-				@rclient.exec = sinon.stub().callsArgWith(0, null, ["INVALID-HASH-VALUE"])
+				@multi.exec = sinon.stub().callsArgWith(0, null, ["INVALID-HASH-VALUE"])
 				@RedisManager.putDocInMemory @project_id, @doc_id, @lines, @version, @ranges, @pathname, done
 
 			it 'should log a hash error', ->

				@RedisManager.getDoc @project_id, @doc_id, @callback

			it "should get the lines from redis", ->
				@rclient.get
					.calledWith("doclines:#{@doc_id}")
					.should.equal true

			it "should get the version from", ->
				@rclient.get
					.calledWith("DocVersion:#{@doc_id}")
					.should.equal true

			it 'should get the hash', ->
				@rclient.get
					.calledWith("DocHash:#{@doc_id}")
					.should.equal true

			it "should get the ranges", ->
				@rclient.get
					.calledWith("Ranges:#{@doc_id}")
					.should.equal true

			it "should get the unflushed time", ->
				@rclient.get
					.calledWith("UnflushedTime:#{@doc_id}")
					.should.equal true

			it "should get the pathname", ->
				@rclient.get
					.calledWith("Pathname:#{@doc_id}")
					.should.equal true



		describe "when the document is not present", ->
			beforeEach ->
				@multi.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

