<commit_before>require 'cucumber/messages'

module Cucumber
  module Messages
    describe TimeConversion do
      include TimeConversion

      it 'converts to and from milliseconds since epoch' do
        time = Time.now
        timestamp = time_to_timestamp(time)
        time_again = timestamp_to_time(timestamp)

        time_diff = (time_again - time).abs

        expect(time_diff).to be < 1.0/(10**6)
      end

      it 'converts to and from seconds duration' do
        duration_in_seconds = 1234
        duration = seconds_to_duration(duration_in_seconds)
        duration_in_seconds_again = duration_to_seconds(duration)

        expect(duration_in_seconds_again).to eq(duration_in_seconds)
      end
<commit_msg>Make test a bit more readable<commit_after>require 'cucumber/messages'

module Cucumber
  module Messages
    describe TimeConversion do
      include TimeConversion

      it 'converts to and from milliseconds since epoch' do
        time = Time.now
        timestamp = time_to_timestamp(time)
        time_again = timestamp_to_time(timestamp)

        expect(time).to be_within(0.0000001).of(time_again)
      end

      it 'converts to and from seconds duration' do
        duration_in_seconds = 1234
        duration = seconds_to_duration(duration_in_seconds)
        duration_in_seconds_again = duration_to_seconds(duration)

        expect(duration_in_seconds_again).to eq(duration_in_seconds)
      end

{'fraction_non_alphanumeric': 0.05853658536585366, 'fraction_numerical': 0.014634146341463415, 'mean_word_length': 3.1028571428571428, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1085947', 'n_tokens_mistral': 431, 'n_tokens_neox': 404, 'n_words': 101}