Sha256: 0fe7f261843d41ffdf04c541e06553bd6d93834ef902ae94602cd8bf3c52cb81

Contents?: true

Size: 701 Bytes

Versions: 5

Compression:

Stored size: 701 Bytes

Contents

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

# Global Setup
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

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 do |world|
  world.extend EmailSpec::Helpers
  world.extend EmailSpec::Matchers
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bmabey-email_spec-0.0.10 lib/email_spec/cucumber.rb
bmabey-email_spec-0.0.9 lib/email_spec/cucumber.rb
bmabey-email_spec-0.1.0 lib/email_spec/cucumber.rb
bmabey-email_spec-0.1.1 lib/email_spec/cucumber.rb
bmabey-email_spec-0.1.2 lib/email_spec/cucumber.rb