mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
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:
@@ -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']
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
RootView = require 'root-view'
|
||||
Editor = require 'editor'
|
||||
|
||||
describe "WrapGuide", ->
|
||||
fdescribe "WrapGuide", ->
|
||||
[editor, wrapGuide] = []
|
||||
|
||||
beforeEach ->
|
||||
|
||||
Reference in New Issue
Block a user