I'm not sure why you will get capybara to check your email. I know that email_spec has the ability to:
- Follow the links
- Make sure the text exists in the letter
Of course, the cucumber email_steps.rb that email_spec generates provides various pointers to show you how to achieve the above using only the code directly at the email_spec level (i.e. no cucumber).
Directly from email_steps.rb:
# Commonly used email steps
Assuming you can call various methods in your specification, for example:
open_email(address, :with_text => 'mytext') current_email.default_part_body.to_s.should include(text) visit_in_email(link) EmailSpec::EmailViewer::save_and_open_email(current_email)
then you can simulate opening an email address, checking email contents and viewing email links or even saving email so you can view it in safari or another browser.
What would capybara give you on top of this?
source share