<commit_before>require 'day'
require 'date'

describe Day do
  let(:date) { Date.new(2013, 12, 24) }
  let(:event_1) { double('Event') }
  let(:event_2) { double('Event') }
  let(:entry_1) { double('Entry') }
  let(:entry_2) { double('Entry') }
  let(:events) { double('Array', sort: sorted_events) }
  let(:sorted_events) { [event_1, event_2] }
  let(:entry_class) { double('EntryClass') }
  subject { Day.new(date, events, entry_class) }

  its(:date) { should be date }

  before do
    allow(entry_class).to receive(:new).with(event_1).and_return(entry_1)
    allow(entry_class).to receive(:new).with(event_2).and_return(entry_2)
  end

  describe 'each' do
    it 'should yield the entries in the right order' do
      expect { |b| subject.each(&b) }.to yield_successive_args(entry_1, entry_2)
    end
  end
end<commit_msg>Day Spec Fixup for RSpec 3.0.0<commit_after>require 'day'
require 'date'

describe Day do
  let(:date) { Date.new(2013, 12, 24) }
  let(:event_1) { double('Event') }
  let(:event_2) { double('Event') }
  let(:entry_1) { double('Entry') }
  let(:entry_2) { double('Entry') }
  let(:events) { double('Array', sort: sorted_events) }
  let(:sorted_events) { [event_1, event_2] }
  let(:entry_class) { double('EntryClass') }
  subject { Day.new(date, events, entry_class) }

  it 'should set the date correctly' do
    subject.date.should be date
  end

  before do
    allow(entry_class).to receive(:new).with(event_1).and_return(entry_1)
    allow(entry_class).to receive(:new).with(event_2).and_return(entry_2)
  end

  describe 'each' do
    it 'should yield the entries in the right order' do
      expect { |b| subject.each(&b) }.to yield_successive_args(entry_1, entry_2)
    end
  end
end
{'fraction_non_alphanumeric': 0.15532286212914484, 'fraction_numerical': 0.02501454333915067, 'mean_word_length': 4.391849529780564, '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': '1638515', 'n_tokens_mistral': 643, 'n_tokens_neox': 619, 'n_words': 141}