<commit_before># encoding: UTF-8

require File.expand_path('../../test_integration_helper', __FILE__)

class SpontaneousInstallationTest < OrderedTestCase

  def self.before_suite
    system "rm -rf pkg && rake gem:build"
    @@gem_build = File.expand_path(Dir["pkg/*.gem"].last)
  end

  def self.after_suite
    system "gem uninstall -a -x -I spontaneous"
  end

  def system(command)
    puts "$ #{command}"
    Kernel.system command
  end

  def setup
    @root = Dir.mktmpdir
    Dir.chdir(@root)
  end

  def test_step_001__gem_installation
    assert_raises "Precondition failed, spontaneous gem is already installed", Gem::LoadError do
      Gem::Specification.find_by_name("spontaneous")
    end
    system "gem install #{@@gem_build} --no-rdoc --no-ri"
    spec = Gem::Specification.find_by_name("spontaneous")
    asssert_instance_of Gem::Specification, spec, "spontaneous gem should have been installed"
  end

  def test_step_002__invalid_site_creation
  end

  def test_step_003__valid_site_creation
  end

  def test_step_004__site_initialization
  end<commit_msg>Hopefully a fix for travis gem installation test<commit_after># encoding: UTF-8

require File.expand_path('../../test_integration_helper', __FILE__)

class SpontaneousInstallationTest < OrderedTestCase

  def self.before_suite
    system "rm -rf pkg && rake gem:build"
    @@gem_build = File.expand_path(Dir["pkg/*.gem"].last)
  end

  def self.after_suite
    system "gem uninstall -a -x -I spontaneous"
  end

  def system(command)
    puts "$ #{command}"
    Kernel.system command
  end

  def setup
    @root = Dir.mktmpdir
    Dir.chdir(@root)
  end

  def test_step_001__gem_installation
    assert_raises "Precondition failed, spontaneous gem is already installed", Gem::LoadError do
      Gem::Specification.find_by_name("spontaneous")
    end
    system "gem install #{@@gem_build} --no-rdoc --no-ri"
    Gem.refresh
    spec = Gem::Specification.find_by_name("spontaneous")
    assert_instance_of Gem::Specification, spec, "spontaneous gem should have been installed"
  end

  def test_step_002__invalid_site_creation
  end

  def test_step_003__valid_site_creation
  end

  def test_step_004__site_initialization
  end
{'fraction_non_alphanumeric': 0.09284420289855072, 'fraction_numerical': 0.01177536231884058, 'mean_word_length': 3.997737556561086, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4807944', 'n_tokens_mistral': 753, 'n_tokens_neox': 707, 'n_words': 175}