<commit_before>require 'spec_helper'

describe HipaaCrypt do

end
<commit_msg>specs for HipaaCrypt.config<commit_after>require 'spec_helper'

describe HipaaCrypt do

  describe '.config' do
    context 'when a cipher is added' do
      it 'sets Configuration#chiper' do
        cipher = { name: 'XYZ', length: 256, mode: 'ABC' }
        config = HipaaCrypt.config { |c| c.cipher =  cipher }

        expect(config.cipher).to eq cipher
      end
    end

    context 'when a cipher is not added' do
      it 'sets a default cipher' do
        default_cipher = { name: 'AES', length: 256, mode: 'CBC' }
        HipaaCrypt.instance_variable_set(:@config, nil)
        config = HipaaCrypt.config

        expect(config.cipher).to eq default_cipher
      end
    end

    context 'when a key is added' do
      it 'sets Configuration#key' do
        key = 'a secret key'
        config = HipaaCrypt.config { |c| c.key = key }

        expect(config.key).to eq key
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09219858156028368, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 2.4545454545454546, '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': '2461823', 'n_tokens_mistral': 344, 'n_tokens_neox': 302, 'n_words': 101}