Rename path variables to prevent collisions

This commit is contained in:
Kevin Sawicki
2013-06-12 17:35:12 -07:00
parent a0a0036727
commit 711d20ea14
2 changed files with 3 additions and 4 deletions

View File

@@ -111,11 +111,11 @@ describe 'FuzzyFinder', ->
describe "when the selected path isn't a file that exists", ->
it "leaves the the tree view open, doesn't open the path in the editor, and displays an error", ->
rootView.attachToDom()
path = rootView.getActiveView().getPath()
editorPath = rootView.getActiveView().getPath()
rootView.trigger 'fuzzy-finder:toggle-file-finder'
finderView.confirmed({path: 'dir/this/is/not/a/file.txt'})
expect(finderView.hasParent()).toBeTruthy()
expect(rootView.getActiveView().getPath()).toBe path
expect(rootView.getActiveView().getPath()).toBe editorPath
expect(finderView.find('.error').text().length).toBeGreaterThan 0
advanceClock(2000)
expect(finderView.find('.error').text().length).toBe 0

View File

@@ -115,9 +115,8 @@ describe "StatusBar", ->
rootView.attachToDom()
it "displays the current branch for files in repositories", ->
path = require.resolve('fixtures/git/master.git/HEAD')
project.setPath(fsUtils.resolveOnLoadPath('fixtures/git/master.git'))
rootView.open(path)
rootView.open(require.resolve('fixtures/git/master.git/HEAD'))
expect(statusBar.branchArea).toBeVisible()
expect(statusBar.branchLabel.text()).toBe 'master'