 
     setupGithubFile = ->
       atom.project.setPath(workingDirPath)
-      editor = atom.project.openSync(filePathRelativeToWorkingDir)
-      githubFile = GitHubFile.fromPath(editor.getPath())
+      waitsForPromise ->
+         atom.workspace.open(filePathRelativeToWorkingDir)
+
+      runs ->
+        editor = atom.workspace.getActiveEditor()
+        githubFile = GitHubFile.fromPath(editor.getPath())
 
     teardownWorkingDirAndRestoreFixture = (fixtureName) ->
       success = null


        beforeEach ->
          setupWorkingDir(fixtureName)
          githubFile = setupGithubFile()

        afterEach ->
          teardownWorkingDirAndRestoreFixture(fixtureName)


        beforeEach ->
          setupWorkingDir(fixtureName)
          setupGithubFile()

        afterEach ->
          teardownWorkingDirAndRestoreFixture(fixtureName)
