Sha256: 4e1bc821f132a33501d4befdc3442bd03aa73dcd4ddf67cda545cf10c93a7464

Contents?: true

Size: 843 Bytes

Versions: 68

Compression:

Stored size: 843 Bytes

Contents

##############################################################################
#                               Email Plugin
##############################################################################
#
# The approach to this plugin is twofold. First it uses the excellent email_spec
# gem to add helpers and matchers to any spec file with :email => true set.
# Secondly, it will also clear all deliveries from ActionMailer if it is loaded.
#
# https://github.com/bmabey/email-spec/
#
begin
  require 'email_spec'

  RSpec.configure do |config|
    config.include EmailSpec::Helpers,  :email => true
    config.include EmailSpec::Matchers, :email => true
  end
rescue LoadError
end

if defined? ActionMailer
  RSpec.configure do |config|
    config.after(:each, :email => true) do
      ActionMailer::Base.deliveries.clear
    end
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
rspectacular-0.70.8 lib/rspectacular/plugins/email.rb
rspectacular-0.70.7 lib/rspectacular/plugins/email.rb
rspeckled-0.0.2 lib/rspeckled/plugins/email.rb
rspeckled-0.0.1 lib/rspeckled/plugins/email.rb
rspectacular-0.70.6 lib/rspectacular/plugins/email.rb
rspectacular-0.62.0 lib/rspectacular/plugins/email.rb
rspectacular-0.61.0 lib/rspectacular/plugins/email.rb
rspectacular-0.60.0 lib/rspectacular/plugins/email.rb
rspectacular-0.59.0 lib/rspectacular/plugins/email.rb
rspectacular-0.58.0 lib/rspectacular/plugins/email.rb
rspectacular-0.57.0 lib/rspectacular/plugins/email.rb
rspectacular-0.56.0 lib/rspectacular/plugins/email.rb
rspectacular-0.55.0 lib/rspectacular/plugins/email.rb
rspectacular-0.54.0 lib/rspectacular/plugins/email.rb
rspectacular-0.53.1 lib/rspectacular/plugins/email.rb
rspectacular-0.53.0 lib/rspectacular/plugins/email.rb
rspectacular-0.52.0 lib/rspectacular/plugins/email.rb
rspectacular-0.51.0 lib/rspectacular/plugins/email.rb
rspectacular-0.50.0 lib/rspectacular/plugins/email.rb
rspectacular-0.49.0 lib/rspectacular/plugins/email.rb