 			@rclient.exec.yields()
 			@lines = ["one", "two", "three"]
 			@version = 42
+			@hash = crypto.createHash('sha1').update(JSON.stringify(@lines)).digest('hex')
 			@ranges = { comments: "mock", entries: "mock" }
 		
 		describe "with non-empty ranges", ->

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

			@rclient.del
				.calledWith("DocVersion:#{@doc_id}")
				.should.equal true

		it "should delete the hash", ->
			@rclient.del
				.calledWith("DocHash:#{@doc_id}")
				.should.equal true
		
		it "should delete the project_id for the doc", ->
			@rclient.del
