Move snapshot code to package

This commit is contained in:
probablycorey
2013-11-22 14:38:13 -08:00
parent eb985a9880
commit a0ceb78627
6 changed files with 0 additions and 60 deletions

View File

@@ -2706,21 +2706,6 @@ describe "EditorView", ->
expect(buffer.lineForRow(15)).toBeUndefined()
expect(editorView.getCursorBufferPosition()).toEqual [13, 0]
describe "editor:save-debug-snapshot", ->
it "saves the state of the rendered lines, the display buffer, and the buffer to a file of the user's choosing", ->
saveDialogCallback = null
spyOn(atom, 'showSaveDialog').andCallFake (callback) -> saveDialogCallback = callback
spyOn(fs, 'writeFileSync')
editorView.trigger 'editor:save-debug-snapshot'
statePath = path.join(temp.dir, 'state')
expect(atom.showSaveDialog).toHaveBeenCalled()
saveDialogCallback(statePath)
expect(fs.writeFileSync).toHaveBeenCalled()
expect(fs.writeFileSync.argsForCall[0][0]).toBe statePath
expect(typeof fs.writeFileSync.argsForCall[0][1]).toBe 'string'
describe "when the escape key is pressed on the editor view", ->
it "clears multiple selections if there are any, and otherwise allows other bindings to be handled", ->
atom.keymap.bindKeys 'name', '.editor', 'escape': 'test-event'