<commit_before>describe Geometry::Segment do
  describe "#initialize" do
    it "should create a new segment with two ends when given 4 co-ordinates" do
      segment = Geometry::Segment.new(4,1,2,3)
      expect(segment.end1.x_coord).to eq(4)
      expect(segment.end1.y_coord).to eq(1)
      expect(segment.end2.x_coord).to eq(2)
      expect(segment.end2.y_coord).to eq(3)
    end
  end

  describe "length" do
    it "should return 4 when given 0,0,4,0" do
      segment = Geometry::Segment.new(0,0,4,0)
      expect(segment.length).to eq(4)
    end

    it "should return 5 when given 0,0,3,4" do
      segment = Geometry::Segment.new(0,0,3,4)
      expect(segment.length).to eq(5)
    end
  end
end<commit_msg>Add extra spec to test Segment#length method<commit_after>describe Geometry::Segment do
  describe "#initialize" do
    it "should create a new segment with two ends when given 4 co-ordinates" do
      segment = Geometry::Segment.new(4,1,2,3)
      expect(segment.end1.x_coord).to eq(4)
      expect(segment.end1.y_coord).to eq(1)
      expect(segment.end2.x_coord).to eq(2)
      expect(segment.end2.y_coord).to eq(3)
    end
  end

  describe "length" do
    it "should return 4 when given 0,0,4,0" do
      segment = Geometry::Segment.new(0,0,4,0)
      expect(segment.length).to eq(4)
    end

    it "should return 5 when given 0,0,3,4" do
      segment = Geometry::Segment.new(0,0,3,4)
      expect(segment.length).to eq(5)
    end

    it "should return return square root of 2 when given 1,1,2,2" do
      segment = Geometry::Segment.new(1,1,2,2)
      expect(segment.length).to eq(Math.sqrt(2))
    end
  end
end
{'fraction_non_alphanumeric': 0.12461820403176542, 'fraction_numerical': 0.046426389737324374, 'mean_word_length': 3.1363636363636362, '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': '748501', 'n_tokens_mistral': 604, 'n_tokens_neox': 575, 'n_words': 148}