<commit_before>#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

require 'spec_helper'

describe Diaspora::Relayable do
  shared_examples_for "it is relayable" do

    describe 'interacted_at' do
      it 'sets the interacted at of the parent to the created at of the relayable post' do
        Timecop.freeze do
          relayable = build_object
          relayable.save
          if relayable.parent.respond_to?(:interacted_at) #I'm sorry.
            relayable.parent.interacted_at.to_i.should == relayable.created_at.to_i
          end
        end<commit_msg>freeze at a valid time, not 0000-01-01 ...<commit_after>#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

require 'spec_helper'

describe Diaspora::Relayable do
  shared_examples_for "it is relayable" do

    describe 'interacted_at' do
      it 'sets the interacted at of the parent to the created at of the relayable post' do
        Timecop.freeze Time.now do
          relayable = build_object
          relayable.save
          if relayable.parent.respond_to?(:interacted_at) #I'm sorry.
            relayable.parent.interacted_at.to_i.should == relayable.created_at.to_i
          end
        end
{'fraction_non_alphanumeric': 0.0670995670995671, 'fraction_numerical': 0.01875901875901876, 'mean_word_length': 2.779291553133515, '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': '2536613', 'n_tokens_mistral': 451, 'n_tokens_neox': 418, 'n_words': 141}