I have a message object, @mail and I’d like to test that the “from” name includes a string:
@mail.from.should include @author.name
however, @mail.from is simply an array of the addresses the mail is to be sent to, there’s no mention of what label the addresses should be given.
How can I access the “from” label so that I can test it includes the author’s name?
You can use email-spec gem for this.
Some test example from my app