 				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)

				@LockManager.runWithLock = (lockFile, runner, callback) =>
					callback(@error)
				@CompileManager.doCompileWithLock @request, @callback

			it "should ensure that the compile directory exists", ->
				@fse.ensureDir.calledWith(@compileDir)
				.should.equal true

			it "should not call doCompile with the request", ->
				@CompileManager.doCompile
