<commit_before>require 'spec_helper'

describe "Aclatraz" do
  describe "on init" do
    it "should raise InvalidStore error when given store doesn't exists" do 
      lambda { Aclatraz.init(:fooobar) }.should raise_error(Aclatraz::InvalidStore)
    end
  
    it "should properly set datastore when class given" do 
      class TestStore; end
      lambda { Aclatraz.init(TestStore) }.should_not raise_error
      Aclatraz.store.should be_kind_of(TestStore)
    end
  end
  
  it "should raise StoreNotInitialized error when store has not been set yet" do 
    Aclatraz.instance_variable_set('@store', nil)
    lambda { Aclatraz.store }.should raise_error(Aclatraz::StoreNotInitialized)
  end
end
<commit_msg>More small changes in specs<commit_after>require 'spec_helper'

describe "Aclatraz" do
  context "on init" do
    it "should raise InvalidStore error when given store doesn't exists" do 
      lambda { Aclatraz.init(:fooobar) }.should raise_error(Aclatraz::InvalidStore)
    end
  
    it "should properly set datastore when class given" do 
      class TestStore; end
      lambda { Aclatraz.init(TestStore) }.should_not raise_error
      Aclatraz.store.should be_kind_of(TestStore)
    end
  end
  
  it "should raise StoreNotInitialized error when store has not been set yet" do 
    Aclatraz.instance_variable_set('@store', nil)
    lambda { Aclatraz.store }.should raise_error(Aclatraz::StoreNotInitialized)
  end
end

{'fraction_non_alphanumeric': 0.07397069085833916, 'fraction_numerical': 0.0, 'mean_word_length': 3.89419795221843, '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': '3788821', 'n_tokens_mistral': 464, 'n_tokens_neox': 454, 'n_words': 136}