<commit_before>dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/../helper/spec_helper")

describe "test_gem_home_spec: the TestGemHome class" do
  include FileUtils
  
  before(:each) do
    @test_gem_home_dir = test_gem_home_dir
  end
  
  it "should create a test gem home" do
    # use should create dir
    GemInstaller::TestGemHome.use

    # make sure rubygems dirs, including source_index, were created
    entries = Dir.entries("#{@test_gem_home_dir}")
    ["cache", "doc", "gems", "specifications","source_cache"].each do |expected_subdir|
      entries.should include(expected_subdir)
    end
  end
end<commit_msg>source_cache -> cache in >1.1.1 (this will break until Gem::RubyGemsVersion is actually released and updated)<commit_after>dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/../helper/spec_helper")

describe "test_gem_home_spec: the TestGemHome class" do
  include FileUtils
  
  before(:each) do
    @test_gem_home_dir = test_gem_home_dir
  end
  
  it "should create a test gem home" do
    # use should create dir
    GemInstaller::TestGemHome.use

    # make sure rubygems dirs, including source_index, were created
    entries = Dir.entries("#{@test_gem_home_dir}")
    expected_entries = ["cache", "doc", "gems", "specifications"]
    if GemInstaller::RubyGemsVersionChecker.matches?('>1.1.1')
      expected_entries << 'cache'
    else
      expected_entries << 'source_cache'
    end    
    
    expected_entries.each do |expected_subdir|
      entries.should include(expected_subdir)
    end
  end
end
{'fraction_non_alphanumeric': 0.10519563822963438, 'fraction_numerical': 0.003848620910840282, 'mean_word_length': 4.0814332247557, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, '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': '1994268', 'n_tokens_mistral': 507, 'n_tokens_neox': 500, 'n_words': 124}