<commit_before>require 'spec_helper'

describe NewTime do
  it 'has a version number' do
    expect(NewTime::VERSION).not_to be nil
  end

  context "For a fixed place" do
    let(:latitude)  { -33.714955 }
    let(:longitude) { 150.311407 }
    let(:tz)        { "Australia/Sydney" }

    describe ".convert" do
      it "00:00:01" do
        expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T00:00:01+11:00"), latitude, longitude, tz).to_s).to eq "10:35 pm"
      end

      it "03:00:00" do
        expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T03:00:00+11:00"), latitude, longitude, tz).to_s).to eq "2:06 am"
      end

      it "14:32:10" do
        expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T14:32:10+11:00"), latitude, longitude, tz).to_s).to eq "1:10 pm"
      end

      it "20:10:00" do
        expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T20:10:00+11:00"), latitude, longitude, tz).to_s).to eq "6:07 pm"
      end

      it "23:59:59" do
        expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T23:59:59+11:00"), latitude, longitude, tz).to_s).to eq "10:35 pm"
      end

    end
  end
end<commit_msg>Add other tests for other date 6 months apart<commit_after>require 'spec_helper'

describe NewTime do
  it 'has a version number' do
    expect(NewTime::VERSION).not_to be nil
  end

  context "For a fixed place" do
    let(:latitude)  { -33.714955 }
    let(:longitude) { 150.311407 }
    let(:tz)        { "Australia/Sydney" }

    describe ".convert" do
      context "2015-01-31" do
        it "00:00:01" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T00:00:01+11:00"), latitude, longitude, tz).to_s).to eq "10:35 pm"
        end

        it "03:00:00" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T03:00:00+11:00"), latitude, longitude, tz).to_s).to eq "2:06 am"
        end

        it "14:32:10" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T14:32:10+11:00"), latitude, longitude, tz).to_s).to eq "1:10 pm"
        end

        it "20:10:00" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T20:10:00+11:00"), latitude, longitude, tz).to_s).to eq "6:07 pm"
        end

        it "23:59:59" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-01-31T23:59:59+11:00"), latitude, longitude, tz).to_s).to eq "10:35 pm"
        end
      end

      context "2015-07-31" do
        it "00:00:01" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-07-31T00:00:01+11:00"), latitude, longitude, tz).to_s).to eq "11:03 pm"
        end

        it "03:00:00" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-07-31T03:00:00+11:00"), latitude, longitude, tz).to_s).to eq "1:42 am"
        end

        it "14:32:10" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-07-31T14:32:10+11:00"), latitude, longitude, tz).to_s).to eq "1:40 pm"
        end

        it "20:10:00" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-07-31T20:10:00+11:00"), latitude, longitude, tz).to_s).to eq "7:39 pm"
        end

        it "23:59:59" do
          expect(NewTime::NewTime.convert(DateTime.parse("2015-07-31T23:59:59+11:00"), latitude, longitude, tz).to_s).to eq "11:02 pm"
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.1593554162936437, 'fraction_numerical': 0.1378692927484333, 'mean_word_length': 2.952830188679245, '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': '1739954', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1228, 'n_words': 246}