This commit is contained in:
Kevin Sawicki
2015-04-15 10:24:30 -07:00
parent d4439b1d55
commit 476cf4152c
2 changed files with 5 additions and 5 deletions

View File

@@ -122,10 +122,10 @@ describe "PaneView", ->
beforeEach ->
paneModel.activateItem(editor1)
it "adds its file path to the active pane", ->
it "adds the file path as a data attribute to the pane", ->
expect(pane).toHaveAttr('data-active-item-path')
it "adds its file name to the active pane", ->
it "adds the file name as a data attribute to the pane", ->
expect(pane).toHaveAttr('data-active-item-name')
describe "when the new activeItem does not implement ::getPath", ->
@@ -133,10 +133,10 @@ describe "PaneView", ->
paneModel.activateItem(editor1)
paneModel.activateItem(document.createElement('div'))
it "removes its file path from the active pane", ->
it "does not add the file path as a data attribute to the pane", ->
expect(pane).not.toHaveAttr('data-active-item-path')
it "removes its file name from the active pane", ->
it "does not add the file name as data attribute to the pane", ->
expect(pane).not.toHaveAttr('data-active-item-name')
describe "when an item is destroyed", ->

View File

@@ -1,3 +1,4 @@
path = require 'path'
{CompositeDisposable} = require 'event-kit'
Grim = require 'grim'
{$, callAttachHooks, callRemoveHooks} = require './space-pen-extensions'
@@ -72,7 +73,6 @@ class PaneElement extends HTMLElement
itemView = atom.views.getView(item)
if itemPath = item.getPath?()
path = require 'path'
@dataset.activeItemName = path.basename(itemPath)
@dataset.activeItemPath = itemPath
else