<commit_before>require "spec_helper"
require "opic"

describe Opic do

end<commit_msg>Adds specs to ensure that api key is set<commit_after>require "spec_helper"
require "opic"

describe Opic do

  it 'raises an exception when no API key is present' do
    expect(Opic.get('foobar')).to raise_error
  end

  it 'does not complain when an API key is present' do
    Opic.api_key = '1234'
    Opic.get('foobar')
  end
end
{'fraction_non_alphanumeric': 0.08353221957040573, 'fraction_numerical': 0.00954653937947494, 'mean_word_length': 4.121951219512195, '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': '5241205', 'n_tokens_mistral': 150, 'n_tokens_neox': 140, 'n_words': 52}