 atom.themes.requireStylesheet '../static/jasmine'
 
 fixturePackagesPath = path.resolve(__dirname, './fixtures/packages')
-keymap.loadBundledKeymaps()
+atom.keymap.loadBundledKeymaps()
 [bindingSetsToRestore, bindingSetsByFirstKeystrokeToRestore] = []
 
 $(window).on 'core:close', -> window.close()

  config.set "editor.autoIndent", false
  config.set "core.disabledPackages", ["package-that-throws-an-exception"]
  config.save.reset()

  # make editor display updates synchronous
  spyOn(Editor.prototype, 'requestDisplayUpdate').andCallFake -> @updateDisplay()


beforeEach ->
  $.fx.off = true
  atom.project = new Project(specProjectPath)
  window.project = atom.project

  window.resetTimeouts()
  atom.packages.packageStates = {}
  spyOn(atom, 'saveWindowState')
  atom.syntax.clearGrammarOverrides()
  atom.syntax.clearProperties()

  # used to reset keymap after each spec
  bindingSetsToRestore = _.clone(keymap.bindingSets)
  bindingSetsByFirstKeystrokeToRestore = _.clone(keymap.bindingSetsByFirstKeystroke)

  # reset config before each spec; don't load or save from/to `config.json`
  config = new Config()
  config.packageDirPaths.unshift(fixturePackagesPath)
  spyOn(config, 'load')
  spyOn(config, 'save')
  config.set "editor.fontFamily", "Courier"
