Sha256: b08c03222ca3062db0dd9f3ab6cf9dc1411a0b51fc37215f43a7b95a9d45452d

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

module RailsBestPractices
  module Prepares
    describe MailerPrepare do
      let(:runner) { Core::Runner.new(prepares: described_class.new) }

      it 'parses mailer names' do
        content = <<-EOF
        class ProjectMailer < ActionMailer::Base
        end
        EOF
        runner.prepare('app/mailers/project_mailer.rb', content)
        expect(Prepares.mailers.map(&:to_s)).to eq(['ProjectMailer'])
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_best_practices-1.23.2 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.23.1 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.23.0 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.22.1 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.22.0 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.21.0 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.20.1 spec/rails_best_practices/prepares/mailer_prepare_spec.rb