<commit_before>require_relative '../../ohm_helper.rb'
require_relative '../../../app/ohm-models/activity.rb'

class Blob < OurOhm ;end
class Foo < OurOhm
  timestamped_set :activities, Activity
end

describe Activity::Listener do
  let(:gu1) { GraphUser.create }
  let(:gu2) { GraphUser.create }
  let(:b1)  { Blob.create }
  let(:b2)  { Blob.create }
  let(:f1)  { Foo.create }
  let(:f2)  { Foo.create }

  before do
    unless defined?(GraphUser)
      class GraphUser < OurOhm
        def graph_user
          self
        end
      end
    end
  end

  describe :new do<commit_msg>Include spec_helper so this test can be run as a single file<commit_after>require 'spec_helper'

class Blob < OurOhm ;end
class Foo < OurOhm
  timestamped_set :activities, Activity
end

describe Activity::Listener do
  let(:gu1) { GraphUser.create }
  let(:gu2) { GraphUser.create }
  let(:b1)  { Blob.create }
  let(:b2)  { Blob.create }
  let(:f1)  { Foo.create }
  let(:f2)  { Foo.create }

  describe :new do
{'fraction_non_alphanumeric': 0.12424849699398798, 'fraction_numerical': 0.012024048096192385, 'mean_word_length': 3.0609756097560976, 'pattern_counts': {'":': 0, '<': 8, '<?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': '4883631', 'n_tokens_mistral': 365, 'n_tokens_neox': 356, 'n_words': 88}