 wrench = require 'wrench'
 temp = require 'temp'
 _ = require 'underscore'
+
+execCommands = (commands, callback) ->
+  if process.platform is 'win32'
+    command = commands.join(' & ')
+  else
+    command = commands.join(' && ')
+  exec(command, callback)
 
 describe "git", ->
   repo = null

        expect(repo.getIndexBlob('a.txt')).toBe 'first line\n'

        gitCommandHandler = jasmine.createSpy('gitCommandHandler')
        exec "cd #{repoDirectory} && git add a.txt", gitCommandHandler

        waitsFor ->
          gitCommandHandler.callCount is 1

        fs.writeFileSync(filePath, 'first line is different', 'utf8')

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

        waitsFor ->
          gitCommandHandler.callCount is 1
