Sha256: d0c11092cbbcfa0929c1eededbd44399e4558d2a698ea705f5137a5f109502d8

Contents?: true

Size: 447 Bytes

Versions: 13

Compression:

Stored size: 447 Bytes

Contents

module Spree
  module TestingSupport
    module Mail
      def with_test_mail
        old_value = ActionMailer::Base.delivery_method
        ActionMailer::Base.delivery_method = :test
        ActionMailer::Base.deliveries.clear
        begin
          yield
        ensure
          ActionMailer::Base.delivery_method = old_value
        end
      end
    end
  end
end

RSpec.configure do |config|
  config.extend Spree::TestingSupport::Mail
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
solidus_core-1.0.7 lib/spree/testing_support/mail.rb
solidus_core-1.0.6 lib/spree/testing_support/mail.rb
solidus_core-1.0.5 lib/spree/testing_support/mail.rb
solidus_core-1.0.4 lib/spree/testing_support/mail.rb
solidus_core-1.0.3 lib/spree/testing_support/mail.rb
solidus_core-1.0.2 lib/spree/testing_support/mail.rb
solidus_core-1.0.1 lib/spree/testing_support/mail.rb
solidus_core-1.0.0 lib/spree/testing_support/mail.rb
solidus_core-1.0.0.rc2 lib/spree/testing_support/mail.rb
solidus_core-1.0.0.rc1 lib/spree/testing_support/mail.rb
solidus_core-1.0.0.pre3 lib/spree/testing_support/mail.rb
solidus_core-1.0.0.pre2 lib/spree/testing_support/mail.rb
solidus_core-1.0.0.pre lib/spree/testing_support/mail.rb