<commit_before>shared_context "constant numbers" do
  let(:one){ Constant.new(1) }
  let(:two){ Constant.new(2) }
  let(:three){ Constant.new(3) }
  let(:four){ Constant.new(4) }
  let(:five){ Constant.new(5) }
end
shared_examples_for "correct string output" do |output|
  it "shows a correct string representation of #{output}" do
    expect(subject.to_s).to eq output
  end
end

shared_examples_for "a correct calculator" do |result|
  it "returns the correct result" do
    expect(subject.result).to eq result
  end
end<commit_msg>Change precise equality in shared example to be_within matcher<commit_after>shared_context "constant numbers" do
  let(:one){ Constant.new(1) }
  let(:two){ Constant.new(2) }
  let(:three){ Constant.new(3) }
  let(:four){ Constant.new(4) }
  let(:five){ Constant.new(5) }
end
shared_examples_for "correct string output" do |output|
  it "shows a correct string representation of #{output}" do
    expect(subject.to_s).to eq output
  end
end

shared_examples_for "a correct calculator" do |result|
  it "returns the correct result" do
    expect(subject.result).to be_within(0.01).of result
  end
end
{'fraction_non_alphanumeric': 0.1235657546337158, 'fraction_numerical': 0.01147396293027361, 'mean_word_length': 4.815384615384615, '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': '6488918', 'n_tokens_mistral': 375, 'n_tokens_neox': 365, 'n_words': 111}