<commit_before>RSpec.shared_examples :dispatcher do |dispatcher|
  specify "calls subscribed handler" do
    handler = spy
    event   = instance_double(RubyEventStore::Event)
    dispatcher.(handler, event)

    expect(handler).to have_received(:call).with(event)
  end

  specify "error when invalid subscriber passed" do
    handler = double
    event   = instance_double(RubyEventStore::Event)

    expect { dispatcher.(handler, event) }.to raise_error(RubyEventStore::MethodNotDefined,
      "#call method not found in RSpec::Mocks::Double subscriber. Are you sure it is a valid subscriber?")
  end
end
<commit_msg>One more change for mutant compatibility.<commit_after>RSpec.shared_examples :dispatcher do |dispatcher|
  specify "calls subscribed handler" do
    handler = double(:handler)
    event   = instance_double(RubyEventStore::Event)

    expect(handler).to receive(:call).with(event)
    dispatcher.(handler, event)
  end

  specify "error when invalid subscriber passed" do
    handler = double(:handler)
    event   = instance_double(RubyEventStore::Event)

    expect { dispatcher.(handler, event) }.to raise_error(RubyEventStore::MethodNotDefined,
      "#call method not found in RSpec::Mocks::Double subscriber. Are you sure it is a valid subscriber?")
  end
end

{'fraction_non_alphanumeric': 0.09416342412451362, 'fraction_numerical': 0.0, 'mean_word_length': 4.567099567099567, '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': '3314021', 'n_tokens_mistral': 382, 'n_tokens_neox': 361, 'n_words': 107}