meta-} goes to next buffer

This commit is contained in:
Corey Johnson
2012-04-11 13:41:19 -07:00
parent 4bdc908b98
commit bf367863ba
3 changed files with 36 additions and 4 deletions

View File

@@ -2096,3 +2096,21 @@ describe "Editor", ->
eventHandler.reset()
editor.buffer.setPath("new.txt")
expect(eventHandler).toHaveBeenCalled()
fdescribe ".loadNextEditorState()", ->
it "loads the next editor state and wraps to beginning when end is reached", ->
buffer0 = new Buffer("0")
buffer1 = new Buffer("1")
buffer2 = new Buffer("2")
editor = new Editor {buffer: buffer0}
editor.setBuffer(buffer1)
editor.setBuffer(buffer2)
expect(editor.buffer.path).toBe "2"
editor.loadNextEditorState()
expect(editor.buffer.path).toBe "0"
editor.loadNextEditorState()
expect(editor.buffer.path).toBe "1"
editor.loadNextEditorState()
expect(editor.buffer.path).toBe "2"