Refactor spec helpers
Rubocop fixes