Deactivate RootView before removing files.

To limit the amount of fs events that are triggered.
This commit is contained in:
Corey Johnson
2012-11-15 11:15:17 -08:00
parent d9a3fbd910
commit 0149012efc

View File

@@ -22,7 +22,7 @@ describe "TreeView", ->
expect(treeView.root.directory.subscriptionCount()).toBeGreaterThan 0
afterEach ->
rootView.deactivate()
rootView?.deactivate()
describe ".initialize(project)", ->
it "renders the root of the project and its contents alphabetically with subdirectories first in a collapsed state", ->
@@ -596,6 +596,8 @@ describe "TreeView", ->
fileView = treeView.find('.file:contains(test-file.txt)').view()
afterEach ->
rootView.deactivate()
rootView = null
fs.remove(rootDirPath) if fs.exists(rootDirPath)
describe "tree-view:add", ->