       updateCallback.callCount is 1
 
     runs ->
-      expect(updateCallback.argsForCall[0][0].message).toBe "Updating to \u201Cfoo@1.0.0\u201D failed."
-      expect(updateCallback.argsForCall[0][0].packageInstallError).toBe true
-      expect(updateCallback.argsForCall[0][0].stderr).toContain 'ENOENT'
+      updateArg = updateCallback.argsForCall[0][0]
+      expect(updateArg.message).toBe "Updating to \u201Cfoo@1.0.0\u201D failed."
+      expect(updateArg.packageInstallError).toBe true
+      expect(updateArg.stderr).toContain noSuchCommandError
 
   describe "::isPackageInstalled()", ->
     it "returns false a package is not installed", ->

      installCallback.callCount is 1

    runs ->
      expect(installCallback.argsForCall[0][0].message).toBe "Installing \u201Cfoo@1.0.0\u201D failed."
      expect(installCallback.argsForCall[0][0].packageInstallError).toBe true
      expect(installCallback.argsForCall[0][0].stderr).toContain 'ENOENT'

      packageManager.uninstall {name: 'foo'}, uninstallCallback


      uninstallCallback.callCount is 1

    runs ->
      uninstallArg = uninstallCallback.argsForCall[0][0]
      expect(uninstallArg.message).toBe "Uninstalling \u201Cfoo\u201D failed."
      expect(uninstallArg.stderr).toContain noSuchCommandError

      packageManager.update {name: 'foo'}, '1.0.0', updateCallback

