Skip to content

Instantly share code, notes, and snippets.

@andreaseriksson
Created November 21, 2013 10:49
Show Gist options
  • Save andreaseriksson/7579624 to your computer and use it in GitHub Desktop.
Save andreaseriksson/7579624 to your computer and use it in GitHub Desktop.
rspec test mail attachments
mail.attachments.should have(1).attachment
attachment = mail.attachments[0]
attachment.should be_a_kind_of(Mail::Part)
attachment.content_type.should be_start_with('application/ics;')
attachment.filename.should == 'event.ics'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment