Sha256: bdea099b80e12b9a58b506c0d06e5d3f8e9f26a8686c33fcb85009d38bde3797

Contents?: true

Size: 676 Bytes

Versions: 8

Compression:

Stored size: 676 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/, 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.11 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.10 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.9 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.8 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.7 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.6 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.5 lib/minitest-spec-rails/init/action_mailer.rb
minitest-spec-rails-4.7.4 lib/minitest-spec-rails/init/action_mailer.rb