@@ -2353,11 +2353,13 @@ describe "TreeView", ->
2353
2353
expect (callback).not .toHaveBeenCalled ()
2354
2354
2355
2355
describe " tree-view:move" , ->
2356
+ beforeEach ->
2357
+ jasmine .attachToDOM (workspaceElement)
2358
+
2356
2359
describe " when a file is selected" , ->
2357
2360
[moveDialog , callback ] = []
2358
2361
2359
2362
beforeEach ->
2360
- jasmine .attachToDOM (workspaceElement)
2361
2363
callback = jasmine .createSpy (" onEntryMoved" )
2362
2364
treeView .onEntryMoved (callback)
2363
2365
@@ -2518,8 +2520,6 @@ describe "TreeView", ->
2518
2520
moveDialog = null
2519
2521
2520
2522
beforeEach ->
2521
- jasmine .attachToDOM (workspaceElement)
2522
-
2523
2523
waitForWorkspaceOpenEvent ->
2524
2524
atom .workspace .open (filePath)
2525
2525
@@ -3848,7 +3848,26 @@ describe "TreeView", ->
3848
3848
3849
3849
describe " showSelectedEntryInFileManager()" , ->
3850
3850
beforeEach ->
3851
- spyOn (shell, ' showItemInFolder' ).andReturn (false )
3851
+ atom .notifications .clear ()
3852
+ jasmine .attachToDOM (workspaceElement)
3853
+
3854
+ it " displays the standard error output when the process fails" , ->
3855
+ {BufferedProcess } = require ' atom'
3856
+ spyOn (BufferedProcess .prototype , ' spawn' ).andCallFake ->
3857
+ EventEmitter = require ' events'
3858
+ fakeProcess = new EventEmitter ()
3859
+ fakeProcess .send = ->
3860
+ fakeProcess .kill = ->
3861
+ fakeProcess .stdout = new EventEmitter ()
3862
+ fakeProcess .stdout .setEncoding = ->
3863
+ fakeProcess .stderr = new EventEmitter ()
3864
+ fakeProcess .stderr .setEncoding = ->
3865
+ @process = fakeProcess
3866
+ process .nextTick ->
3867
+ fakeProcess .stderr .emit (' data' , ' bad process' )
3868
+ fakeProcess .stderr .emit (' close' )
3869
+ fakeProcess .stdout .emit (' close' )
3870
+ fakeProcess .emit (' exit' )
3852
3871
3853
3872
it " does nothing if no entry is selected" , ->
3854
3873
treeView .deselect ()
0 commit comments