 
   describe 'when the version flag is specified', ->
     it 'prints a usage message', ->
-      spyOn(console, 'log')
-      spyOn(console, 'error')
       apm.run(['-h'])
       expect(console.log).not.toHaveBeenCalled()
       expect(console.error).toHaveBeenCalled()


  describe 'when an unrecognized command is specified', ->
    it 'prints an error message', ->
      spyOn(console, 'log')
      spyOn(console, 'error')
      apm.run(['this-will-never-be-a-command'])
      expect(console.log).not.toHaveBeenCalled()
      expect(console.error).toHaveBeenCalled()

      atomHome = temp.mkdirSync('apm-home-dir-')
      process.env.ATOM_HOME = atomHome
      process.env.ATOM_NODE_URL = "http://localhost:3000/node"

    afterEach ->
      server.close()
