<commit_before>require 'spec_helper'

describe User do

  it { should have_db_column(:email).of_type(:string) }
  it { should have_db_column(:name).of_type(:string) }
  it { should have_db_column(:with_company_since).of_type(:date) }
  it { should have_db_column(:days_off_left).of_type(:integer) }

  it { should have_many(:kudos).through(:weekly_kudos) }
  it { should have_many(:kudos_received).class_name("Kudo") }


  context "weekly kudo for current week" do
    let(:tom) { create(:user, name: 'Tom') }
    let!(:weekly_kudo) { WeeklyKudo.current(tom) }

    it { expect(weekly_kudo).to eq(tom.current_weekly_kudo) }
  end

  describe "kudos that have been received in current week from current_user", :focus do
    after do
      Timecop.return<commit_msg>clear out focus<commit_after>require 'spec_helper'

describe User do

  it { should have_db_column(:email).of_type(:string) }
  it { should have_db_column(:name).of_type(:string) }
  it { should have_db_column(:with_company_since).of_type(:date) }
  it { should have_db_column(:days_off_left).of_type(:integer) }

  it { should have_many(:kudos).through(:weekly_kudos) }
  it { should have_many(:kudos_received).class_name("Kudo") }


  context "weekly kudo for current week" do
    let(:tom) { create(:user, name: 'Tom') }
    let!(:weekly_kudo) { WeeklyKudo.current(tom) }

    it { expect(weekly_kudo).to eq(tom.current_weekly_kudo) }
  end

  describe "kudos that have been received in current week from current_user" do
    after do
      Timecop.return
{'fraction_non_alphanumeric': 0.12483574244415244, 'fraction_numerical': 0.0, 'mean_word_length': 4.812977099236641, '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': '5415490', 'n_tokens_mistral': 549, 'n_tokens_neox': 530, 'n_words': 112}