<commit_before># encoding: utf-8
RSpec.describe DoubleEntry::Reporting::LineAggregate do
  describe '.table_name' do
    subject { DoubleEntry::Reporting::LineAggregate.table_name }
    it { should eq('double_entry_line_aggregates') }
  end

  describe '#aggregate' do
    let(:filter) do
      instance_double(DoubleEntry::Reporting::LineAggregateFilter, :filter => line_relation)
    end
    let(:line_relation) do
      instance_double(DoubleEntry::Line::ActiveRecord_Relation, :sum => spy)
    end

    let(:function) { :sum }
    let(:account) { spy }<commit_msg>we dont actually care so much about what the object is specifically. Also, apparently this fails when tested under mysql, who knew!<commit_after># encoding: utf-8
RSpec.describe DoubleEntry::Reporting::LineAggregate do
  describe '.table_name' do
    subject { DoubleEntry::Reporting::LineAggregate.table_name }
    it { should eq('double_entry_line_aggregates') }
  end

  describe '#aggregate' do
    let(:line_relation) { spy }
    let(:filter) do
      instance_double(DoubleEntry::Reporting::LineAggregateFilter, :filter => line_relation)
    end

    let(:function) { :sum }
    let(:account) { spy }
{'fraction_non_alphanumeric': 0.11073253833049404, 'fraction_numerical': 0.0017035775127768314, 'mean_word_length': 4.649038461538462, 'pattern_counts': {'":': 0, '<': 3, '<?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': '409430', 'n_tokens_mistral': 355, 'n_tokens_neox': 350, 'n_words': 85}