<commit_before>require 'spec_helper'
require 'typekit'

describe Typekit::Client do
  let(:token) { 'arbitrary' }
  let(:subject) { Typekit::Client.new(token: token) }

  describe '#index' do
    context 'when successful' do
      options = { vcr: { cassette_name: 'index_kits_ok' } }

      it 'returns hashs', options do
        result = subject.index(:kits)
        expect(result).to be_kind_of(Hash)
      end
    end

    context 'when unauthorized' do
      options = { vcr: { cassette_name: 'index_kits_unauthorized' } }

      it 'raises exceptions', options do
        expect { subject.index(:kits) }.to \
          raise_error(Typekit::Error, /(authentication|authorized)/i)
      end
    end

    context 'when found' do
      options = { vcr: { cassette_name: 'show_families_calluna_found' } }

      it 'returns the Response as is', options do
        expect { subject.show(:families, 'calluna') }.not_to \
          raise_error
      end
    end
  end
end
<commit_msg>Fixed a typo introduced trying to fix another typo)<commit_after>require 'spec_helper'
require 'typekit'

describe Typekit::Client do
  let(:token) { 'arbitrary' }
  let(:subject) { Typekit::Client.new(token: token) }

  describe '#index' do
    context 'when successful' do
      options = { vcr: { cassette_name: 'index_kits_ok' } }

      it 'returns hashes', options do
        result = subject.index(:kits)
        expect(result).to be_kind_of(Hash)
      end
    end

    context 'when unauthorized' do
      options = { vcr: { cassette_name: 'index_kits_unauthorized' } }

      it 'raises exceptions', options do
        expect { subject.index(:kits) }.to \
          raise_error(Typekit::Error, /(authentication|authorized)/i)
      end
    end

    context 'when found' do
      options = { vcr: { cassette_name: 'show_families_calluna_found' } }

      it 'returns the Response as is', options do
        expect { subject.show(:families, 'calluna') }.not_to \
          raise_error
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.11133300049925113, 'fraction_numerical': 0.0, 'mean_word_length': 2.8026565464895636, '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': '4899871', 'n_tokens_mistral': 658, 'n_tokens_neox': 618, 'n_words': 166}