 
   When -> @subject(@grunt)
   And -> expect(@grunt.registerMultiTask).to.have.been.calledWith 'git', 'A simple API for using git via grunt', sinon.match.func
+  And -> @task = @grunt.registerMultiTask.getCall(0).args[2]
 
   describe 'command with git options', ->
     Given -> @emitter = new EventEmitter()

      c: true
      d: 'bar'
    When ->
      @grunt.registerMultiTask.getCall(0).args[2].apply @context, []
      @emitter.emit 'close', 0
    Then -> expect(@cb).to.have.been.called


      stdio: 'foo'
      cwd: 'bar'
    When ->
      @task.apply @context, []
      @emitter.emit 'close', 0
    Then -> expect(@cb).to.have.been.called

