RSpec refactoring