<commit_before>require 'helper'

describe Toy::Equality do
  uses_constants('User', 'Game', 'Person')

  describe "#eql?" do
    it "returns true if same class and id" do
      User.new(:id => 1).should eql(User.new(:id => 1))
    end

    it "return false if different class" do
      User.new(:id => 1).should_not eql(Person.new(:id => 1))
    end

    it "returns false if different id" do
      User.new(:id => 1).should_not eql(User.new(:id => 2))
    end
  end

  describe "equal?" do
    it "returns true if same object" do
      user = User.new(:id => 1)
      user.should equal(user)
    end

    it "returns false if not same object" do

    end<commit_msg>Add #equal?(…) false spec. <commit_after>require 'helper'

describe Toy::Equality do
  uses_constants('User', 'Game', 'Person')

  describe "#eql?" do
    it "returns true if same class and id" do
      User.new(:id => 1).should eql(User.new(:id => 1))
    end

    it "return false if different class" do
      User.new(:id => 1).should_not eql(Person.new(:id => 1))
    end

    it "returns false if different id" do
      User.new(:id => 1).should_not eql(User.new(:id => 2))
    end
  end

  describe "equal?" do
    it "returns true if same object" do
      user = User.new(:id => 1)
      user.should equal(user)
    end

    it "returns false if not same object" do
      user = User.new
      other_user = User.new
      user.should_not equal(other_user)
    end
{'fraction_non_alphanumeric': 0.13291579679888657, 'fraction_numerical': 0.009742519137091163, 'mean_word_length': 2.687179487179487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '3069360', 'n_tokens_mistral': 497, 'n_tokens_neox': 472, 'n_words': 159}