Sha256: a0fbb30df6836c8b3654c11d9df3a6fa5bc873158b34b7267455d203e498519d
Contents?: true
Size: 798 Bytes
Versions: 14
Compression:
Stored size: 798 Bytes
Contents
# frozen_string_literal: true # 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/ RSpec.configure do |config| config.include EmailSpec::Helpers, :email => true config.include EmailSpec::Matchers, :email => true config.include EmailSpec::MailerDeliveries, :email => true end if defined? ActionMailer RSpec.configure do |config| config.before(:each, :email => true) do if defined?(ActionMailer) && ActionMailer::Base.delivery_method == :cache mailer.clear_cache else deliveries.clear end end end end
Version data entries
14 entries across 14 versions & 1 rubygems