Refactor message_spec.rb to make more DRY