Refactors generic_file_spec.rb