<commit_before>module Easy
  module Matchers
    module Validations
      def validate_presence_of(field)
        HaveValidationMatcher.new(field, :presence)
      end
    end
  end
end<commit_msg>Add message validation to validate_presence_of<commit_after>module Easy
  module Matchers
    module Validations
      def validate_presence_of(field)
        ValidatePresenceOfMatcher.new(field)
      end

      class ValidatePresenceOfMatcher < HaveValidationMatcher
        include WithMessage

        def initialize(name)
          super(name, :presence)
        end

        def matches?(actual)
          @result = super(actual)

          return false unless @result

          check_expected_message if @expected_message

          @result
        end

        def with_message(message)
          @expected_message = message
          self
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.04406779661016949, 'fraction_numerical': 0.0, 'mean_word_length': 2.2335766423357666, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '236723', 'n_tokens_mistral': 234, 'n_tokens_neox': 229, 'n_words': 60}