   describe "when a new file is opened in the active editor", ->
     it "selects the file in the tree view if the file's entry visible", ->
       sampleJs.click()
-      rootView.open(require.resolve('fixtures/tree-view/tree-view.txt'))
+      rootView.open(fs.resolveOnLoadPath('fixtures/tree-view/tree-view.txt'))
 
       expect(sampleTxt).toHaveClass 'selected'
       expect(treeView.find('.selected').length).toBe 1

    [ignoreFile] = []

    beforeEach ->
      ignoreFile = fs.join(require.resolve('fixtures/tree-view'), '.gitignore')
      fs.write(ignoreFile, 'tree-view.js')
      config.set "core.hideGitIgnoredFiles", false


        it "creates a root directory view but does not attach to the root view", ->
          rootView.getActivePaneItem().saveAs("/tmp/test.txt")
          expect(treeView.hasParent()).toBeFalsy()
          expect(treeView.root.getPath()).toBe '/tmp'
          expect(treeView.root.parent()).toMatchSelector(".tree-view")

    describe "when the root view is opened to a file path", ->
