Sha256: 15a18339a075ac300c990549924cd2c8344e73c1ad77d4c03803cd0e17ccbe70

Contents?: true

Size: 824 Bytes

Versions: 7

Compression:

Stored size: 824 Bytes

Contents

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

# Global Setup
if defined?(ActionMailer)
  unless [:test, :activerecord, :cache, :file].include?(ActionMailer::Base.delivery_method)
    ActionMailer::Base.delivery_method = :test
  end
  ActionMailer::Base.perform_deliveries = true

  Before do
    # Scenario setup
    case ActionMailer::Base.delivery_method
      when :test then ActionMailer::Base.deliveries.clear
      when :cache then ActionMailer::Base.clear_cache
    end
  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

7 entries across 7 versions & 2 rubygems

Version Path
email_spec-1.0.1 lib/email_spec/cucumber.rb
email_spec-0.6.6 lib/email_spec/cucumber.rb
email_spec-0.6.5 lib/email_spec/cucumber.rb
email_spec-1.1.1 lib/email_spec/cucumber.rb
email_spec-0.6.4 lib/email_spec/cucumber.rb
email_spec-tricycle-0.6.3 lib/email_spec/cucumber.rb
email_spec-0.6.3 lib/email_spec/cucumber.rb