Don't let atom spec bind default keys again

This commit is contained in:
Corey Johnson
2012-04-03 17:21:13 -07:00
parent 37a9d88b48
commit 6dc4d9bb05
3 changed files with 2 additions and 11 deletions

View File

@@ -7,6 +7,8 @@ describe "Atom", ->
waitsFor "there to be no windows", ->
atom.windows.length == 0
beforeEach ->
spyOn(Atom.prototype, "setUpKeymap")
describe ".open(path)", ->
beforeEach ->
@@ -39,9 +41,6 @@ describe "Atom", ->
beforeEach ->
atom = new Atom
afterEach ->
atom.destroy()
it "adds the window to the windows array if it isn't already present", ->
atom.windowOpened window
atom.windowOpened window

View File

@@ -24,10 +24,6 @@ class Atom
$(document).on 'keydown', @handleKeyEvent
@keymap.bindDefaultKeys()
destroy: ->
$(document).off 'keydown', @handleKeyEvent
@keymap.unbindDefaultKeys()
open: (path) ->
$native.open path

View File

@@ -23,10 +23,6 @@ class Keymap
path = $native.openDialog()
atom.open(path) if path
unbindDefaultKeys: ->
$(document).unbind 'new-window', @_newWindow
$(document).unbind 'open', @_open
bindKeys: (selector, bindings) ->
@bindingSets.unshift(new BindingSet(selector, bindings))