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.27.0 lib/rspectacular/plugins/email.rb
rspectacular-0.26.0 lib/rspectacular/plugins/email.rb
rspectacular-0.25.0 lib/rspectacular/plugins/email.rb
rspectacular-0.24.0 lib/rspectacular/plugins/email.rb
rspectacular-0.23.1 lib/rspectacular/plugins/email.rb
rspectacular-0.23.0 lib/rspectacular/plugins/email.rb
rspectacular-0.22.2 lib/rspectacular/plugins/email.rb
rspectacular-0.22.1 lib/rspectacular/plugins/email.rb
rspectacular-0.22.0 lib/rspectacular/plugins/email.rb
rspectacular-0.21.6 lib/rspectacular/plugins/email.rb
rspectacular-0.21.5 lib/rspectacular/plugins/email.rb
rspectacular-0.21.4 lib/rspectacular/plugins/email.rb
rspectacular-0.21.3 lib/rspectacular/plugins/email.rb
rspectacular-0.21.2 lib/rspectacular/plugins/email.rb
rspectacular-0.21.1 lib/rspectacular/plugins/email.rb
rspectacular-0.21.0 lib/rspectacular/plugins/email.rb
rspectacular-0.20.0 lib/rspectacular/plugins/email.rb
rspectacular-0.19.0 lib/rspectacular/plugins/email.rb
rspectacular-0.18.0 lib/rspectacular/plugins/email.rb
rspectacular-0.17.1 lib/rspectacular/plugins/email.rb