Sha256: 9ab1df3d0d812dcede1081aaae4c7fe051574841637d5f06255de209922f6f9a

Contents?: true

Size: 547 Bytes

Versions: 2

Compression:

Stored size: 547 Bytes

Contents

require 'rails_helper'

RSpec.describe EmailPrefixer::Interceptor do
  describe '#delivering_email' do
    subject(:email) { ExampleMailer.simple_mail }
    context 'when application_name and stage_name is configured' do
      before do
        EmailPrefixer.configuration.application_name = 'CustomApp'
        EmailPrefixer.configuration.stage_name = 'staging'
        email.deliver_now
      end
      it 'adds prefix to mail subject' do
        expect(email.subject).to eq '[CustomApp STAGING] Here is the Subject'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
email_prefixer-1.2.0 spec/lib/email_prefixer/interceptor_spec.rb
email_prefixer-1.2.0.pre.1 spec/lib/email_prefixer/interceptor_spec.rb