         fs.writeFileSync(filePath, 'first line is different', 'utf8')
 
         gitCommandHandler = jasmine.createSpy('gitCommandHandler')
-        exec "cd #{repoDirectory} && git add a.txt", gitCommandHandler
+        execCommands ["cd #{repoDirectory}", "git add a.txt"], gitCommandHandler
 
         waitsFor ->
           gitCommandHandler.callCount is 1

wrench = require 'wrench'
temp = require 'temp'
_ = require 'underscore'

describe "git", ->
  repo = null

      wrench.copyDirSyncRecursive(path.join(__dirname, 'fixtures', 'master.git'), path.join(submoduleDirectory, '.git'))

      gitCommandHandler = jasmine.createSpy('gitCommandHandler')
      execCommands ["cd #{repoDirectory}", "git submodule add #{submoduleDirectory} sub"], gitCommandHandler

      waitsFor ->
        gitCommandHandler.callCount is 1
