<commit_before>require 'active_support/deprecation'

module Shoulda # :nodoc:
  module Matchers
    module ActionMailer # :nodoc:

      # The right email is sent.
      #
      #   it { should have_sent_email.with_subject(/is spam$/) }
      #   it { should have_sent_email.from('<EMAIL>') }
      #   it { should have_sent_email.with_body(/is spam\./) }
      #   it { should have_sent_email.to('<EMAIL>') }
      #   it { should have_sent_email.with_part('text/html', /HTML spam/) }
      #   it { should have_sent_email.with_subject(/spam/).
      #                               from('<EMAIL>').
      #                               reply_to('<EMAIL>').
      #                               with_body(/spam/).
      #                               to('<EMAIL>') }
      #
      # Use values of instance variables
      #   it {should have_sent_email.to {@user.email} }
      def have_sent_email
        HaveSentEmailMatcher.new(self)
      end

      class HaveSentEmailMatcher # :nodoc:

        def initialize(context)
          ActiveSupport::Deprecation.warn 'The have_sent_email matcher is deprecated and will be removed in 2.0'
          @context = context
        end<commit_msg> * DeprecationWarning removed<commit_after>require 'active_support/deprecation'

module Shoulda # :nodoc:
  module Matchers
    module ActionMailer # :nodoc:

      # The right email is sent.
      #
      #   it { should have_sent_email.with_subject(/is spam$/) }
      #   it { should have_sent_email.from('<EMAIL>') }
      #   it { should have_sent_email.with_body(/is spam\./) }
      #   it { should have_sent_email.to('<EMAIL>') }
      #   it { should have_sent_email.with_part('text/html', /HTML spam/) }
      #   it { should have_sent_email.with_subject(/spam/).
      #                               from('<EMAIL>').
      #                               reply_to('<EMAIL>').
      #                               with_body(/spam/).
      #                               to('<EMAIL>') }
      #
      # Use values of instance variables
      #   it {should have_sent_email.to {@user.email} }
      def have_sent_email
        HaveSentEmailMatcher.new(self)
      end

      class HaveSentEmailMatcher # :nodoc:

        def initialize(context)
          @context = context
        end
{'fraction_non_alphanumeric': 0.11140235910878113, 'fraction_numerical': 0.0008737439930100481, 'mean_word_length': 1.7197149643705463, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7149167', 'n_tokens_mistral': 686, 'n_tokens_neox': 671, 'n_words': 137}