 				project_id: @project_id = "project-id-123"
 				user_id: @user_id = "1234"
 			@output_files = ["foo", "bar"]
+			@Settings.compileDir = "compiles"
+			@compileDir = "#{@Settings.path.compilesDir}/#{@project_id}-#{@user_id}"
 			@CompileManager.doCompile = sinon.stub().callsArgWith(1, null, @output_files)
 			@LockManager.runWithLock = (lockFile, runner, callback) ->
 				runner (err, result...) ->

			beforeEach ->
				@CompileManager.doCompileWithLock @request, @callback

			it "should call doCompile with the request", ->
				@CompileManager.doCompile
				.calledWith(@request)

			"./TikzManager": @TikzManager = {}
			"./LockManager": @LockManager = {}
			"fs": @fs = {}
			"fs-extra": @fse = { ensureDir: sinon.stub().callsArg(1) }
		@callback = sinon.stub()

	describe "doCompileWithLock", ->
