Move loadPackages to atom global. Handle '-tmbundle' in regex.

This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
This commit is contained in:
Nathan Sobo
2012-12-20 21:32:33 -07:00
parent dd8597cc9c
commit c7605b8aa6
4 changed files with 29 additions and 37 deletions

View File

@@ -11,12 +11,14 @@ TextMateTheme = require 'text-mate-theme'
require 'window'
requireStylesheet "jasmine.css"
# Load TextMate bundles, which specs rely on (but not other packages)
atom.loadPackages(atom.getAvailableTextMateBundles())
beforeEach ->
# don't load user configuration
# reset config after each benchmark; don't load or save from/to `config.json`
window.config = new Config()
spyOn(config, 'load')
spyOn(config, 'save')
config.assignDefaults()
keymap = new Keymap
keymap.bindDefaultKeys()