<commit_before>require 'spec_helper'

module Core
  module Interactors
    module Customers
      RSpec.describe Finder do
        describe 'call' do
          context 'when customer exists' do
            subject{ described_class.new('known') }

            let(:data) do
              {
                first_name: 'Phil',
                email: '<EMAIL>'
              }
            end

            before do
              allow(Registry::Repository).to receive(:[]).with(:customer) do
                double(find: data)
              end
            end

            it 'returns a customer' do
              expect(subject.call).to be_a(Customer)
            end

            it 'retursn the correct customer' do
              customer = subject.call

              expect(customer.id).to eql('known')
              expect(customer.first_name).to eql(data[:first_name])<commit_msg>fix typo<commit_after>require 'spec_helper'

module Core
  module Interactors
    module Customers
      RSpec.describe Finder do
        describe 'call' do
          context 'when customer exists' do
            subject{ described_class.new('known') }

            let(:data) do
              {
                first_name: 'Phil',
                email: '<EMAIL>'
              }
            end

            before do
              allow(Registry::Repository).to receive(:[]).with(:customer) do
                double(find: data)
              end
            end

            it 'returns a customer' do
              expect(subject.call).to be_a(Customer)
            end

            it 'returns the correct customer' do
              customer = subject.call

              expect(customer.id).to eql('known')
              expect(customer.first_name).to eql(data[:first_name])
{'fraction_non_alphanumeric': 0.08715336728919072, 'fraction_numerical': 0.0, 'mean_word_length': 1.4285714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6031176', 'n_tokens_mistral': 451, 'n_tokens_neox': 428, 'n_words': 114}