<commit_before>describe RunLoop::Version do

  describe '.new' do
    describe 'non-pre-release versions' do
      subject(:version) { RunLoop::Version.new('0.9.169') }
      it { expect(version).not_to be nil }
      it { expect(version.major).to be == 0 }
      it { expect(version.minor).to be == 9 }
      it { expect(version.patch).to be == 169 }
      it { expect(version.pre).to be nil }
      it { expect(version.pre_version).to be nil }
    end

    describe 'unnumbered pre-release versions' do
      subject(:version) { RunLoop::Version.new('0.9.169.pre') }
      it { expect(version.pre).to be == 'pre' }
      it { expect(version.pre_version).to be nil }
    end

    describe 'numbered pre-release versions' do
      subject(:version) { RunLoop::Version.new('0.9.169.pre1') }
      it { expect(version.pre).to be == 'pre1' }
      it { expect(version.pre_version).to be == 1 }
    end

    describe 'invalid arguments' do
      it { expect { RunLoop::Version.new(' ') }.to raise_error ArgumentError }
      it { expect { RunLoop::Version.new('5.1.pre3') }.to raise_error ArgumentError }
      it { expect { RunLoop::Version.new('5.pre2') }.to raise_error ArgumentError }
    end
  end

  describe '==' do
    it 'tests equality' do
      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5')
      expect(a == b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(a == b).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a == b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a == b).to be false

    end
  end

  describe '!=' do
    it 'tests not equal' do
      a = RunLoop::Version.new('0.9.4')
      b = RunLoop::Version.new('0.9.5')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre2')
      expect(a != b).to be true
    end
  end

  describe '<' do
    it 'tests less than' do
      a = RunLoop::Version.new('0.9.4')
      b = RunLoop::Version.new('0.9.5')
      expect(a < b).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(a > b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a < b).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre2')
      expect(a < b).to be true
    end
  end

  describe '>' do
    it 'tests greater than' do
      a = RunLoop::Version.new('0.9.4')
      b = RunLoop::Version.new('0.9.5')
      expect(b > a).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(b < a).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(b > a).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre2')
      expect(b > a).to be true
    end<commit_msg>Add missing test case for version comparison<commit_after>describe RunLoop::Version do

  describe '.new' do
    describe 'non-pre-release versions' do
      subject(:version) { RunLoop::Version.new('0.9.169') }
      it { expect(version).not_to be nil }
      it { expect(version.major).to be == 0 }
      it { expect(version.minor).to be == 9 }
      it { expect(version.patch).to be == 169 }
      it { expect(version.pre).to be nil }
      it { expect(version.pre_version).to be nil }
    end

    describe 'unnumbered pre-release versions' do
      subject(:version) { RunLoop::Version.new('0.9.169.pre') }
      it { expect(version.pre).to be == 'pre' }
      it { expect(version.pre_version).to be nil }
    end

    describe 'numbered pre-release versions' do
      subject(:version) { RunLoop::Version.new('0.9.169.pre1') }
      it { expect(version.pre).to be == 'pre1' }
      it { expect(version.pre_version).to be == 1 }
    end

    describe 'invalid arguments' do
      it { expect { RunLoop::Version.new(' ') }.to raise_error ArgumentError }
      it { expect { RunLoop::Version.new('5.1.pre3') }.to raise_error ArgumentError }
      it { expect { RunLoop::Version.new('5.pre2') }.to raise_error ArgumentError }
    end
  end

  describe '==' do
    it 'tests equality' do
      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5')
      expect(a == b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(a == b).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a == b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a == b).to be false

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a == b).to be false

    end
  end

  describe '!=' do
    it 'tests not equal' do
      a = RunLoop::Version.new('0.9.4')
      b = RunLoop::Version.new('0.9.5')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a != b).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre2')
      expect(a != b).to be true
    end
  end

  describe '<' do
    it 'tests less than' do
      a = RunLoop::Version.new('0.9.4')
      b = RunLoop::Version.new('0.9.5')
      expect(a < b).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(a > b).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a > b).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(a < b).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre2')
      expect(a < b).to be true
    end
  end

  describe '>' do
    it 'tests greater than' do
      a = RunLoop::Version.new('0.9.4')
      b = RunLoop::Version.new('0.9.5')
      expect(b > a).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre')
      expect(b < a).to be true

      a = RunLoop::Version.new('0.9.5')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(b < a).to be true

      a = RunLoop::Version.new('0.9.5.pre')
      b = RunLoop::Version.new('0.9.5.pre1')
      expect(b > a).to be true

      a = RunLoop::Version.new('0.9.5.pre1')
      b = RunLoop::Version.new('0.9.5.pre2')
      expect(b > a).to be true
    end
{'fraction_non_alphanumeric': 0.1845982763413956, 'fraction_numerical': 0.041701417848206836, 'mean_word_length': 2.2959230416857537, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '5076285', 'n_tokens_mistral': 2755, 'n_tokens_neox': 2672, 'n_words': 547}