'Running it on a branch with a non-fragment in the topfiles dir does not
return green.'

def test_topfileButNotFragmentAdded(self):

    runCommand(['git', 'checkout', '-b', 'quotefile'], cwd=self.repo.path)
    topfiles = self.repo.child('twisted').child('topfiles')
    topfiles.makedirs()
    notFragment = topfiles.child('1234.txt')
    notFragment.setContent('')
    unrelated = self.repo.child('somefile')
    unrelated.setContent('Boo')
    runCommand(['git', 'add', notFragment.path, unrelated.path], cwd=self.repo.path)
    runCommand(['git', 'commit', '-m', 'not    topfile'], cwd=self.repo.path)
    logs = []
    with self.assertRaises(SystemExit) as e:
        CheckNewsfragmentScript(logs.append).main([self.repo.path])
    self.assertEqual(e.exception.args, (1,))
    self.assertEqual(logs[(-1)], 'No    newsfragment    found.    Have    you    committed    it?')
