Sha256: f09ad685d645498d65475eff87e9f5870bafb28cc748d4868338738733bac9fe

Contents?: true

Size: 869 Bytes

Versions: 12

Compression:

Stored size: 869 Bytes

Contents

require "rails_helper"

describe MnoEnterprise::MailAdapters::Adapter do
  subject { described_class }

  describe '.test?' do
    subject { described_class.test? }

    around do |example|
      orig_delivery_method = Rails.configuration.action_mailer.delivery_method
      example.run
      Rails.configuration.action_mailer.delivery_method = orig_delivery_method
    end

    context 'with delivery method' do
      before { Rails.configuration.action_mailer.delivery_method = :method }
      it { is_expected.to be false }
    end
    context 'with nil delivery method' do
      before { Rails.configuration.action_mailer.delivery_method = nil }
      it { is_expected.to be false }
    end

    context 'with :test delivery method' do
      before { Rails.configuration.action_mailer.delivery_method = :test }
      it { is_expected.to be true }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mno-enterprise-core-3.4.0 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.3.3 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.3.2 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.2.1 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.3.1 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.3.0 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.2.0 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.1.4 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.1.3 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.1.2 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.1.1 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb
mno-enterprise-core-3.1.0 spec/lib/mno_enterprise/mail_adapters/adapter_spec.rb