From 192e804c8f726dbd52932c7fed8a0f309981dad3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 17 Nov 2015 08:53:13 -0800 Subject: [PATCH] Fix specs. Duh. --- spec/text-editor-spec.coffee | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/spec/text-editor-spec.coffee b/spec/text-editor-spec.coffee index 05e454da3..39740ebd2 100644 --- a/spec/text-editor-spec.coffee +++ b/spec/text-editor-spec.coffee @@ -163,14 +163,8 @@ describe "TextEditor", -> expect(editor.getTitle()).toBe 'untitled' describe ".getLongTitle()", -> - it "appends the name of the containing directory to the basename of the file", -> - expect(editor.getLongTitle()).toBe 'sample.js - fixtures' - buffer.setPath(undefined) - expect(editor.getLongTitle()).toBe 'untitled' - - describe ".getUniqueTitle()", -> it "returns file name when there is no opened file with identical name", -> - expect(editor.getUniqueTitle()).toBe 'sample.js' + expect(editor.getLongTitle()).toBe 'sample.js' buffer.setPath(undefined) expect(editor.getLongTitle()).toBe 'untitled' @@ -183,8 +177,8 @@ describe "TextEditor", -> atom.workspace.open(path.join('sample-theme-2', 'readme')).then (o) -> editor2 = o runs -> - expect(editor1.getUniqueTitle()).toBe 'sample-theme-1/readme' - expect(editor2.getUniqueTitle()).toBe 'sample-theme-2/readme' + expect(editor1.getLongTitle()).toBe 'sample-theme-1/readme' + expect(editor2.getLongTitle()).toBe 'sample-theme-2/readme' it "or returns /.../ when opened files has identical file names", -> editor1 = null @@ -195,8 +189,8 @@ describe "TextEditor", -> atom.workspace.open(path.join('sample-theme-2', 'src', 'js', 'main.js')).then (o) -> editor2 = o runs -> - expect(editor1.getUniqueTitle()).toBe 'sample-theme-1/.../main.js' - expect(editor2.getUniqueTitle()).toBe 'sample-theme-2/.../main.js' + expect(editor1.getLongTitle()).toBe 'sample-theme-1/.../main.js' + expect(editor2.getLongTitle()).toBe 'sample-theme-2/.../main.js' it "notifies ::onDidChangeTitle observers when the underlying buffer path changes", ->