     Given -> @context.data =
       cmd: 'remote show origin'
     When ->
-      @grunt.registerMultiTask.getCall(0).args[2].apply @context, []
+      @task.apply @context, []
       @emitter.emit 'close', 0
     Then -> expect(@cb).to.have.been.called
 


  When -> @subject(@grunt)
  And -> expect(@grunt.registerMultiTask).to.have.been.calledWith 'git', 'A simple API for using git via grunt', sinon.match.func

  describe 'command with git options', ->
    Given -> @emitter = new EventEmitter()

    Given -> @context.options.returns
      short: true
    When ->
      @task.apply @context, []
      @emitter.emit 'close', 0
    Then -> expect(@cb).to.have.been.called

