 describe "GitDiffContext", ->
   xdescribe "when an object in the tree is selected", ->
     it "calls GitDiff", ->
-      spyOn(contextPackageFinder, 'get').andReturn {selectedPath: mockSelectedPath}
+      spyOn(contextPackageFinder, 'get').andReturn {selectedPath: selectedFilePath}
       GitDiffContext repo
-      # TODO: expect(GitDiff).toHaveBeenCalledWith repo, file: mockSelectedPath
+      # TODO: expect(GitDiff).toHaveBeenCalledWith repo, file: selectedFilePath
 
   describe "when an object is not selected", ->
     it "notifies the user of the issue", ->

GitUnstageFileContext = require '../../lib/models/context/git-unstage-file-context'

{repo} = require '../fixtures'
mockSelectedPath = 'selected/path'

describe "GitAddContext", ->
  describe "when an object in the tree is selected", ->
    it "calls git::add", ->
      spyOn(contextPackageFinder, 'get').andReturn {selectedPath: mockSelectedPath}
      spyOn(git, 'add')
      GitAddContext repo
      expect(git.add).toHaveBeenCalledWith repo, file: mockSelectedPath

  describe "when an object is not selected", ->
    it "notifies the user of the issue", ->

describe "GitUnstageFileContext", ->
  describe "when an object in the tree is selected", ->
    it "calls git::cmd to unstage files", ->
      spyOn(contextPackageFinder, 'get').andReturn {selectedPath: selectedFilePath}
      spyOn(git, 'cmd').andReturn Promise.resolve()
      GitUnstageFileContext repo
      expect(git.cmd).toHaveBeenCalledWith ['reset', 'HEAD', '--', selectedFilePath], cwd: repo.getWorkingDirectory()

  describe "when an object is not selected", ->
    it "notifies the user of the issue", ->
