<commit_before>require_relative '../my_hash.rb'

RSpec.describe "Hash" do
  before(:each) do
    @hash = MyHash.new
    @hash.set("alpha",1)
    @hash.set("beta",2)
  end

  it "can retrieve a value when given a key" do
    expect(@hash.get("alpha")).to eq(1)
  end

  it "can replace the value of a key" do
    @hash.set("beta",3)
    expect(@hash.get("beta")).to eq(3)
  end

  it "can delete the value of a key" do
    @hash.remove("beta")
    expect(@hash.get("beta")).to eq(nil)
  end

  it "can retrieve the size of a Hash" do
    expect(@hash.size).to eq(2)
  end

  describe "#has_key?" do
    it "returns true if a key exists" do
      expect(@hash.has_key?("alpha")).to eq(true)
    end

    it "returns false if a key doesn't exist" do
      expect(@hash.has_key?("omega")).to eq(false)
    end
  end

  describe "#hashing_function"

  it "correctly hashes words" do
    expect(@hash.hashing_function("beta")).to eq(98)
  end

  it "correctly hashes numbers" do
    expect(@hash.hashing_function(5)).to eq(53)
  end

end
<commit_msg>Fix typo in describe block<commit_after>require_relative '../my_hash.rb'

RSpec.describe "Hash" do
  before(:each) do
    @hash = MyHash.new
    @hash.set("alpha",1)
    @hash.set("beta",2)
  end

  it "can retrieve a value when given a key" do
    expect(@hash.get("alpha")).to eq(1)
  end

  it "can replace the value of a key" do
    @hash.set("beta",3)
    expect(@hash.get("beta")).to eq(3)
  end

  it "can delete the value of a key" do
    @hash.remove("beta")
    expect(@hash.get("beta")).to eq(nil)
  end

  it "can retrieve the size of a Hash" do
    expect(@hash.size).to eq(2)
  end

  describe "#has_key?" do
    it "returns true if a key exists" do
      expect(@hash.has_key?("alpha")).to eq(true)
    end

    it "returns false if a key doesn't exist" do
      expect(@hash.has_key?("omega")).to eq(false)
    end
  end

  describe "#hashing_function" do
    it "correctly hashes words" do
      expect(@hash.hashing_function("beta")).to eq(98)
    end

    it "correctly hashes numbers" do
      expect(@hash.hashing_function(5)).to eq(53)
    end
  end

end

{'fraction_non_alphanumeric': 0.14427157001414428, 'fraction_numerical': 0.010372465818010372, 'mean_word_length': 3.0342205323193916, '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': '3171440', 'n_tokens_mistral': 785, 'n_tokens_neox': 759, 'n_words': 224}