Sha256: 548b23976f31cd3e1e9c48c52d745091f1b4624a87321ace9de39e20dbfe6285

Contents?: true

Size: 499 Bytes

Versions: 5

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

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

      it 'should parse 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

5 entries across 5 versions & 1 rubygems

Version Path
rails_best_practices-1.20.0 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.19.5 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.19.4 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.19.3 spec/rails_best_practices/prepares/mailer_prepare_spec.rb
rails_best_practices-1.19.2 spec/rails_best_practices/prepares/mailer_prepare_spec.rb