Only override resource path if running specs from menu

Previously if the specs were being run via the --test command line
flag then the resource path specified would be overridden and
~/github/atom would be used instead which was causing CI to fail
since it specified a custom resource path at a different location.
This commit is contained in:
Kevin Sawicki
2013-06-15 20:07:16 -07:00
parent 5df5a679ac
commit 6bcd6240ce
2 changed files with 12 additions and 9 deletions

View File

@@ -55,7 +55,7 @@ class AtomApplication
@checkForUpdates()
if test
@runSpecs(true)
@runSpecs(true, @resourcePath)
else if pathsToOpen.length > 0
@openPaths(pathsToOpen, pidToKillWhenClosed, newWindow)
else
@@ -98,7 +98,12 @@ class AtomApplication
{ label: 'Hide Others', accelerator: 'Command+Shift+H', selector: 'hideOtherApplications:' }
{ label: 'Show All', selector: 'unhideAllApplications:' }
{ type: 'separator' }
{ label: 'Run Specs', accelerator: 'Command+MacCtrl+Alt+S', click: => @runSpecs() }
{
label: 'Run Specs'
accelerator: 'Command+MacCtrl+Alt+S'
click: =>
@runSpecs(false, path.join(global.homeDir, 'github', 'atom'))
}
{ type: 'separator' }
{ label: 'Quit', accelerator: 'Command+Q', click: -> app.quit() }
]
@@ -235,12 +240,10 @@ class AtomApplication
@configWindow.browserWindow.on 'destroyed', =>
@configWindow = null
runSpecs: (exitWhenDone) ->
specWindow = new AtomWindow
bootstrapScript: 'spec-bootstrap'
resourcePath: path.join(global.homeDir, 'github', 'atom')
exitWhenDone: exitWhenDone
isSpec: true
runSpecs: (exitWhenDone, resourcePath) ->
bootstrapScript = 'spec-bootstrap'
isSpec = true
new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec})
promptForPath: ->
pathsToOpen = dialog.showOpenDialog title: 'Open', properties: ['openFile', 'openDirectory', 'multiSelections', 'createDirectory']

View File

@@ -1,7 +1,7 @@
RootView = require 'root-view'
Editor = require 'editor'
describe "WrapGuide", ->
fdescribe "WrapGuide", ->
[editor, wrapGuide] = []
beforeEach ->