Sha256: 9188813fae1a94dbba37643892630accf80d0a351087d05b276e2b509ddf8a9d

Contents?: true

Size: 706 Bytes

Versions: 5

Compression:

Stored size: 706 Bytes

Contents

# require this in your env.rb file after you require cucumber/rails/world

# Global Setup
if defined?(ActionMailer)
  ActionMailer::Base.delivery_method = :test unless ActionMailer::Base.delivery_method == :activerecord
  ActionMailer::Base.perform_deliveries = true

  Before do
    # Scenario setup
    ActionMailer::Base.deliveries.clear if ActionMailer::Base.delivery_method == :test
  end
end

After do
  EmailSpec::EmailViewer.save_and_open_all_raw_emails if ENV['SHOW_EMAILS']
  EmailSpec::EmailViewer.save_and_open_all_html_emails if ENV['SHOW_HTML_EMAILS']
  EmailSpec::EmailViewer.save_and_open_all_text_emails if ENV['SHOW_TEXT_EMAILS']
end

World(EmailSpec::Helpers)
World(EmailSpec::Matchers)

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
email_spec-0.3.8 lib/email_spec/cucumber.rb
email_spec-0.3.7 lib/email_spec/cucumber.rb
email_spec-0.3.6 lib/email_spec/cucumber.rb
glennr-email_spec-0.3.5 lib/email_spec/cucumber.rb
email_spec-0.3.5 lib/email_spec/cucumber.rb