refactoring spec Helper