fix(specs): Override configDirPath when running specs within app. Fixes #1133

This commit is contained in:
Ben Gotow 2016-03-08 10:54:39 -08:00
parent 025d4b4081
commit 2376dd1a0f

View file

@ -539,4 +539,9 @@ class Application
isSpec = true
devMode = true
safeMode ?= false
new NylasWindow({bootstrapScript, @configDirPath, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, specFilePattern, logFile, safeMode, showSpecsInWindow})
# Important: Use .nylas-spec instead of .nylas to avoid overwriting the
# user's real email config!
configDirPath = path.join(app.getPath('home'), '.nylas-spec')
new NylasWindow({bootstrapScript, configDirPath, resourcePath, exitWhenDone, isSpec, devMode, specDirectory, specFilePattern, logFile, safeMode, showSpecsInWindow})