RSpec.shared_examples'updating mentions'do|service_class|let(:mentioned_user){create(:user)}let(:service_class){service_class}before{project.team<<[mentioned_user,:developer]}defupdate_mentionable(opts)reset_delivered_emails!perform_enqueued_jobsdoservice_class.new(project,user,opts).execute(mentionable)endmentionable.reloadendcontext'in title'dobefore{update_mentionable(title: mentioned_user.to_reference)}it'emails only the newly-mentioned user'doshould_only_email(mentioned_user)endendcontext'in description'dobefore{update_mentionable(description: mentioned_user.to_reference)}it'emails only the newly-mentioned user'doshould_only_email(mentioned_user)endendend