I’ve been developing some new mailers at work, and I’ve found it really helpful to be able to view the emails as they are sent to the users. So I’ve implemented a cucumber step to help me achieve that, inspired on a similar webrat step for web pages.
Inside a support file for cucumber, like features/support/open_email.rb, insert the following code:
Then in your step definitions, you can implement a step like this
UPDATE: As of version 0.2.2 of pickle, they already include this functionality, although it has a bug which has not been fixed. If you try to call that step, you will see:
To fix it, as a workaround do this in features/support/email.rb