<commit_before>require 'spec_helper'
include When

describe CronPart do
  context 'invalid value' do
    it 'raises an error' do
      expect { CronPart.new('a') }.to raise_error
    end
  end

  context 'basic number' do
    let(:cron_part) { CronPart.new('5') }
<commit_msg>checks for specific error class<commit_after>require 'spec_helper'
include When

describe CronPart do
  context 'invalid value' do
    it 'raises an error' do
      expect { CronPart.new('a') }.to raise_error When::CronPart::InvalidString
    end
  end

  context 'basic number' do
    let(:cron_part) { CronPart.new('5') }

{'fraction_non_alphanumeric': 0.10333333333333333, 'fraction_numerical': 0.0033333333333333335, 'mean_word_length': 3.7698412698412698, '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': '1196010', 'n_tokens_mistral': 206, 'n_tokens_neox': 194, 'n_words': 61}