Refactor blocks in spec factories.