<commit_before>require 'spec_helper'

describe 'TableGenerator' do

  describe '#set_table_field_width' do
    it 'should set the field with member in the module' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.field_width).to eq(5)
    end
  end
 #    2   3   5
 # 2  4   6  10
 # 3  6   9  15
 # 5 10  15  25

  describe '#get_line_contents' do
    it 'should build a line with the expected string' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.get_line_contents(2,[2,3,5])).to eq(" 2    4    6   10")
    end
  end

  describe '#get_header_line' do
    it 'should build a line with the expected header string' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.get_header_line_contents([2,3,5])).to eq("      2    3    5")
    end
  end

  describe "#dump_table" do
    it 'should build a string with expected contents' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.dump_table([2,3,5])).to eq("      2    3    5")
    end
  end
end<commit_msg>killed sample table.  fixed specs to expect a field at the beginning of the line that has the 'label' number in it.<commit_after>require 'spec_helper'

describe 'TableGenerator' do

  describe '#set_table_field_width' do
    it 'should set the field with member in the module' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.field_width).to eq(5)
    end
  end

  describe '#get_line_contents' do
    it 'should build a line with the expected string' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.get_line_contents(2,[2,3,5])).to eq("    2    4    6   10")
    end
  end

  describe '#get_header_line' do
    it 'should build a line with the expected header string' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.get_header_line_contents([2,3,5])).to eq("         2    3    5")
    end
  end

  describe "#dump_table" do
    it 'should build a string with expected contents' do
      TableGenerator.prepare_table_field_width([1,10])
      expect(TableGenerator.dump_table([2,3,5])).to eq("      2    3    5")
    end
  end
end
{'fraction_non_alphanumeric': 0.0927743086529884, 'fraction_numerical': 0.039250669045495096, 'mean_word_length': 3.2082551594746715, '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': '5422133', 'n_tokens_mistral': 747, 'n_tokens_neox': 713, 'n_words': 213}