Fix app generator test hanging.
Merge pull request #15150 from xtian/fix-railties-tests

Fix app generator test hanging.