Refactor projects controller test method to not output file instead save output to a variable