Sha256: 189b0ee8fa1da7e1d8c38a9f3b490affcbcc946a37c9d6520017a6d25742d61b

Contents?: true

Size: 843 Bytes

Versions: 17

Compression:

Stored size: 843 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.register_observer(EmailSpec::TestObserver)
  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

17 entries across 17 versions & 3 rubygems

Version Path
email_spec-2.3.0 lib/email_spec/cucumber.rb
email_spec-2.2.2 lib/email_spec/cucumber.rb
email_spec-2.2.1 lib/email_spec/cucumber.rb
email_spec-2.2.0 lib/email_spec/cucumber.rb
email_spec-2.1.2 lib/email_spec/cucumber.rb
email_spec-2.1.1 lib/email_spec/cucumber.rb
email_spec-2.1.0 lib/email_spec/cucumber.rb
email_spec-2.0.0 lib/email_spec/cucumber.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/email_spec-1.6.0/lib/email_spec/cucumber.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/email_spec-1.6.0/lib/email_spec/cucumber.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/email_spec-1.6.0/lib/email_spec/cucumber.rb
email_spec-1.6.0 lib/email_spec/cucumber.rb
email_spec-1.5.0 lib/email_spec/cucumber.rb
email_spec-1.4.0 lib/email_spec/cucumber.rb
gardelea-email_spec-1.3.0 lib/email_spec/cucumber.rb
email_spec-1.2.1 lib/email_spec/cucumber.rb
email_spec-1.2.0 lib/email_spec/cucumber.rb