I assume that you're not interested in testing the file loading/parsing capabilities of Rails? Thus, I propose that you either mock the file access or that you separate the file loading from the other aspects.