Move config check of CLI class and start using factory_girl.