<commit_before>describe("Calendar.DayBuilder", function() {
  beforeEach(function() {
    this.describedClass = Calendar.DayBuilder;
    this.firstDay = new Date(2017, 05, 03);

    this.buildSubject = function() {
      return new this.describedClass(this.firstDay);
    }
  });

  describe('#build', function() {
    describe('when passing 0 days as argument', function() {
      it('returns the first day from construction', function() {
        with(this) {
          var subject = this.buildSubject();
          expect(subject.build(0)).toEqual({ day: firstDay.getDate() });
        }
      });

      describe ('when passing the whole month as argument', function(){
        it ('returns the same day', function() {
          with(this) {
            var subject = this.buildSubject();
            expect(subject.build(30)).toEqual({ day: firstDay.getDate() });
          }
        });
      });
    });
  });
});<commit_msg>Complete day builder spec<commit_after>describe("Calendar.DayBuilder", function() {
  beforeEach(function() {
    this.describedClass = Calendar.DayBuilder;
    this.firstDay = new Date(2017, 05, 03);

    this.buildSubject = function() {
      return new this.describedClass(this.firstDay);
    }
  });

  describe('#build', function() {
    describe('when passing 0 days as argument', function() {
      it('returns the first day from construction', function() {
        with(this) {
          var subject = this.buildSubject();
          expect(subject.build(0)).toEqual({ day: 3 });
        }
      });

      describe ('when passing the whole month as argument', function(){
        it ('returns the same day', function() {
          with(this) {
            var subject = this.buildSubject();
            expect(subject.build(30)).toEqual({ day: 3 });
          }
        });
      });

      describe ('when passing 2 as arguments', function() {
        it ('returns 2 days ahead', function(){
          var subject = this.buildSubject();
          expect(subject.build(2)).toEqual({ day: 5 });
        });
      });
    });
  });
});
{'fraction_non_alphanumeric': 0.15202702702702703, 'fraction_numerical': 0.01447876447876448, 'mean_word_length': 2.455, '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': '974709', 'n_tokens_mistral': 580, 'n_tokens_neox': 546, 'n_words': 142}