thanks for capybara-email first!
Today I wanted to fetch the next email received by a given recipient, and ended up doing this as a quick work-around:
self.current_email = emails_sent_to(recipient).first
# TODO: patch capybara-email to allow to fetch the first email for a given recipient instead of doing this
# Keeping a guard until we do that
all_emails.to.should == [recipient]
If I write something to allow to "remove the next email for a given user, assert it's here, and remove it from the deliveries queue", would you integrate it?
Perhaps a utility method something like:
emails = emails_sent_to(recipient)
self.current_email = emails[emails.find_index(current_email) + 1]
Unfortunately I don't have the time to do add this right now.
Hey Brian - I can write some tests and code and send a PR if you'd like (I was more looking for an opinion before providing a patch, than asking for you to implement something!).
@thbar that would be great! :)
When I do that, should I work against master or stable-1-0 branch? I saw your comment in the readme, not sure if it's still applies or not. Thanks!
@thbar sorry I missed your responses. This should be against 1-0-stable