 path = require 'path'
+process = require 'process'
 PackageManager = require '../lib/package-manager'
 
 describe "package manager", ->

      uninstallCallback.callCount is 1

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

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


      updateCallback.callCount is 1

    runs ->
      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", ->
