Added factory_girl_rails and refactored tests