Refactored logic out of after:each into methods