<commit_before>require 'crispy'

module RSpec
  module Crispy
    module CrispyFeatures

    include ::Crispy

      def expect_any_instance_of klass
        CrispyExpectAnyInstanceOf.new klass
      end

      def have_received method_name, *arguments
        CrispyHaveReceived.new method_name, *arguments
      end

      def have_received_once method_name, *arguments
        CrispyHaveReceived::NTimes.new 1, method_name, *arguments
      end

      class CrispyExpectAnyInstanceOf

        def initialize klass
          @klass = klass
        end

        def get_spy_of_instances
          raise CrispyError "#{klass} does not have its instances spied!" unless ::Crispy.spied_instances? klass
          ::Crispy.spy_of_instances(@klass)
        end

      end

      class CrispyHaveReceived
<commit_msg>give up to support have_received_once matcher for v0.1<commit_after>require 'crispy'

module RSpec
  module Crispy
    module CrispyFeatures

    include ::Crispy

      def expect_any_instance_of klass
        CrispyExpectAnyInstanceOf.new klass
      end

      def have_received method_name, *arguments
        CrispyHaveReceived.new method_name, *arguments
      end

      class CrispyExpectAnyInstanceOf

        def initialize klass
          @klass = klass
        end

        def get_spy_of_instances
          raise CrispyError "#{klass} does not have its instances spied!" unless ::Crispy.spied_instances? klass
          ::Crispy.spy_of_instances(@klass)
        end

      end

      class CrispyHaveReceived

{'fraction_non_alphanumeric': 0.04625407166123779, 'fraction_numerical': 0.001954397394136808, 'mean_word_length': 2.572093023255814, 'pattern_counts': {'":': 0, '<': 3, '<?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': '818714', 'n_tokens_mistral': 451, 'n_tokens_neox': 448, 'n_words': 118}