Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created February 5, 2011 20:32
Show Gist options
  • Save matschaffer/812764 to your computer and use it in GitHub Desktop.
Save matschaffer/812764 to your computer and use it in GitHub Desktop.
Then /^"([^"]*)" I should receive an email$/ do |recipient|
@email = ActionMailer::Base.deliveries.detect do |m|
m.to.include? recipient
end
assert @email
end
Then /^that email should have a (\w+) attachment$/ do |type|
assert @email.attachments.detect { |a| a.mime_type.match(type) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment