Module: EmailHelpers

Defined in:
lib/generators/faalis/templates/features/step_definitions/email_steps.rb

Overview

Commonly used email steps

To add your own steps make a custom_email_steps.rb The provided methods are:

last_email_address reset_mailer open_last_email visit_in_email unread_emails_for mailbox_for current_email open_email read_emails_for find_email

General form for email scenarios are:

- clear the email queue (done automatically by email_spec)
- execute steps that sends an email
- check the user received an/no/[0-9] emails
- open the email
- inspect the email contents
- interact with the email (e.g. click links)

The Cucumber steps below are setup in this order.

Instance Method Summary collapse

Instance Method Details

#current_email_addressObject



28
29
30
31
32
33
# File 'lib/generators/faalis/templates/features/step_definitions/email_steps.rb', line 28

def current_email_address
  # Replace with your a way to find your current email. e.g @current_user.email
  # last_email_address will return the last email address used by email spec to find an email.
  # Note that last_email_address will be reset after each Scenario.
  last_email_address || "[email protected]"
end