<commit_before>require 'spec_helper'

RSpec.describe ActiveRecord::Events do
  let(:task) { create(:task) }

  it 'records a timestamp' do
    task.complete

    expect(task.completed?).to eq(true)
    expect(task.not_completed?).to eq(false)

    expect(task.completed_at).to eq(Time.now)
  end

  it 'preserves a timestamp' do
    task = create(:task, completed_at: 3.days.ago)
    task.complete

    expect(task.completed_at).to eq(3.days.ago)
  end

  it 'updates a timestamp' do
    task = create(:task, completed_at: 3.days.ago)
    task.complete!

    expect(task.completed_at).to eq(Time.now)
  end

  it 'defines scope methods' do
    expect(Task.not_completed).to include(task)
    expect(Task.completed).not_to include(task)
  end

  let(:user) { create(:user) }

  it 'handles an object' do
    user.confirm_email

    expect(user.email_confirmed?).to be(true)
    expect(user.email_not_confirmed?).to be(false)
  end
end<commit_msg>Change the equality matcher<commit_after>require 'spec_helper'

RSpec.describe ActiveRecord::Events do
  let(:task) { create(:task) }

  it 'records a timestamp' do
    task.complete

    expect(task.completed?).to eq(true)
    expect(task.not_completed?).to eq(false)

    expect(task.completed_at).to eq(Time.now)
  end

  it 'preserves a timestamp' do
    task = create(:task, completed_at: 3.days.ago)
    task.complete

    expect(task.completed_at).to eq(3.days.ago)
  end

  it 'updates a timestamp' do
    task = create(:task, completed_at: 3.days.ago)
    task.complete!

    expect(task.completed_at).to eq(Time.now)
  end

  it 'defines scope methods' do
    expect(Task.not_completed).to include(task)
    expect(Task.completed).not_to include(task)
  end

  let(:user) { create(:user) }

  it 'handles an object' do
    user.confirm_email

    expect(user.email_confirmed?).to eq(true)
    expect(user.email_not_confirmed?).to eq(false)
  end
end
{'fraction_non_alphanumeric': 0.12289915966386554, 'fraction_numerical': 0.0031512605042016808, 'mean_word_length': 3.6691176470588234, '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': '2866768', 'n_tokens_mistral': 693, 'n_tokens_neox': 638, 'n_words': 142}