Fix breakages due to save method moving to Pane (except saveAll specs)

This commit is contained in:
Nathan Sobo
2013-02-28 18:07:01 -07:00
committed by probablycorey
parent 3f9ee08e76
commit 685df18a3a
4 changed files with 12 additions and 61 deletions

View File

@@ -63,7 +63,7 @@ describe "StatusBar", ->
editor.insertText("\n")
advanceClock(buffer.stoppedChangingDelay)
expect(statusBar.bufferModified.text()).toBe '*'
editor.save()
editor.getBuffer().save()
expect(statusBar.bufferModified.text()).toBe ''
it "disables the buffer modified indicator if the content matches again", ->

View File

@@ -23,7 +23,7 @@ describe "StripTrailingWhitespace", ->
# works for buffers that are already open when extension is initialized
editor.insertText("foo \nbar\t \n\nbaz")
editor.save()
editor.getBuffer().save()
expect(editor.getText()).toBe "foo\nbar\n\nbaz"
# works for buffers that are opened after extension is initialized
@@ -47,25 +47,25 @@ describe "StripTrailingWhitespace", ->
it "adds a trailing newline when there is no trailing newline", ->
editor.insertText "foo"
editor.save()
editor.getBuffer().save()
expect(editor.getText()).toBe "foo\n"
it "removes extra trailing newlines and only keeps one", ->
editor.insertText "foo\n\n\n\n"
editor.save()
editor.getBuffer().save()
expect(editor.getText()).toBe "foo\n"
it "leaves a buffer with a single trailing newline untouched", ->
editor.insertText "foo\nbar\n"
editor.save()
editor.getBuffer().save()
expect(editor.getText()).toBe "foo\nbar\n"
it "leaves an empty buffer untouched", ->
editor.insertText ""
editor.save()
editor.getBuffer().save()
expect(editor.getText()).toBe ""
it "leaves a buffer that is a single newline untouched", ->
editor.insertText "\n"
editor.save()
editor.getBuffer().save()
expect(editor.getText()).toBe "\n"