Merge branch 'master' of github.com:atom/atom

This commit is contained in:
Ben Ogle
2013-11-22 10:03:06 -08:00
9 changed files with 61 additions and 30 deletions

View File

@@ -39,7 +39,9 @@ specPackageName = null
specPackagePath = null
specProjectPath = null
if specDirectory = atom.getLoadSettings().specDirectory
{specDirectory, resourcePath} = atom.getLoadSettings()
if specDirectory
specPackagePath = path.resolve(specDirectory, '..')
try
specPackageName = fs.readObjectSync(path.join(specPackagePath, 'package.json'))?.name
@@ -68,9 +70,7 @@ beforeEach ->
spyOn(atom.menu, 'sendToBrowserProcess')
# reset config before each spec; don't load or save from/to `config.json`
config = new Config
resourcePath: window.resourcePath
configDirPath: atom.getConfigDirPath()
config = new Config({resourcePath, configDirPath: atom.getConfigDirPath()})
spyOn(config, 'load')
spyOn(config, 'save')
config.setDefaults('core', RootView.configDefaults)

View File

@@ -23,9 +23,10 @@ setSpecDirectory = (specDirectory) ->
setSpecField('specDirectory', specDirectory)
runAllSpecs = ->
{resourcePath} = atom.getLoadSettings()
# Only run core specs when resource path is the Atom repository
if Git.exists(window.resourcePath)
requireSpecs(path.join(window.resourcePath, 'spec'))
if Git.exists(resourcePath)
requireSpecs(path.join(resourcePath, 'spec'))
setSpecType('core')
fixturesPackagesPath = path.join(__dirname, 'fixtures', 'packages')
@@ -34,7 +35,7 @@ runAllSpecs = ->
packagePaths = _.groupBy packagePaths, (packagePath) ->
if packagePath.indexOf("#{fixturesPackagesPath}#{path.sep}") is 0
'fixtures'
else if packagePath.indexOf("#{window.resourcePath}#{path.sep}") is 0
else if packagePath.indexOf("#{resourcePath}#{path.sep}") is 0
'bundled'
else
'user'