Sha256: a2e2bbbd0f7c3476bd4cb24ac47114e5b71d3e30cf8586ca08c2a9fb21f83f2f

Contents?: true

Size: 677 Bytes

Versions: 8

Compression:

Stored size: 677 Bytes

Contents

module MiniTestSpecRails
  module Init
    module ActionMailerBehavior

      extend ActiveSupport::Concern

      included do
        register_spec_type(self) { |desc| Class === desc && desc < ActionMailer::Base }
        register_spec_type(/Mailer( ?Test)?\z/i, self)
        register_spec_type(self) { |desc| Class === desc && desc < self }
        register_rails_test_case self
        before { setup_minitest_spec_rails_mailer_class }
      end

      private

      def setup_minitest_spec_rails_mailer_class
        describing_class.tests described_class
      end

    end
  end
end

ActionMailer::TestCase.send :include, MiniTestSpecRails::Init::ActionMailerBehavior

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
minitest-spec-rails-4.7.3 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.2 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.1 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.0 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.3.8 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.3.7 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.3.6 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.3.5 lib/minitest-spec-rails/init/action_mailer.rb