'Test a classic spawnProcess. Check the path of the client code:
fork, exec, exit.'

def test_mockFork(self):

    gc.enable()
    cmd = '/mock/ouch'
    d = defer.Deferred()
    p = TrivialProcessProtocol(d)
    try:
        reactor.spawnProcess(p, cmd, ['ouch'], env=None, usePTY=False)
    except SystemError:
        self.assertTrue(self.mockos.exited)
        self.assertEqual(self.mockos.actions, [('fork', False), 'exec', ('exit', 1)])
    else:
        self.fail('Should    not    be    here')
    self.assertFalse(gc.isenabled())
