diff --git a/spec/app/atom-spec.coffee b/spec/app/atom-spec.coffee index 57b761cec..3949863c3 100644 --- a/spec/app/atom-spec.coffee +++ b/spec/app/atom-spec.coffee @@ -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 diff --git a/src/app/atom.coffee b/src/app/atom.coffee index 846376994..8f3187857 100644 --- a/src/app/atom.coffee +++ b/src/app/atom.coffee @@ -24,10 +24,6 @@ class Atom $(document).on 'keydown', @handleKeyEvent @keymap.bindDefaultKeys() - destroy: -> - $(document).off 'keydown', @handleKeyEvent - @keymap.unbindDefaultKeys() - open: (path) -> $native.open path diff --git a/src/app/keymap.coffee b/src/app/keymap.coffee index 07459f45b..9d02c540d 100644 --- a/src/app/keymap.coffee +++ b/src/app/keymap.coffee @@ -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))