<commit_before>require 'spec_helper'

describe SimplenoteConstructor::PlainTextFormatter do
  describe '.format' do
    let(:note) do
      SimplenoteConstructor::LegacyNote.new(content: "foo\nbar\nbaz",
                                 tags: ['one', 'two', 'three'],
                                 timestamp: Time.now,
                                 title: 'title')
    end
    let(:formatted_note) { SimplenoteConstructor::PlainTextFormatter.format(note) }

    context 'header' do
      it 'converts the note`s timestamp to simplenote format' do
        SimplenoteConstructor::DateTimeFormatter.should_receive(:timestamp).with(note.timestamp)

        formatted_note
      end

      it 'prints a `created` timestamp' do
        SimplenoteConstructor::DateTimeFormatter.stub(timestamp: 'timestamp')

        expect(formatted_note).to match(/^Note Created: timestamp$/)
      end<commit_msg>whitespace<commit_after>require 'spec_helper'

describe SimplenoteConstructor::PlainTextFormatter do
  describe '.format' do
    let(:note) do
      SimplenoteConstructor::LegacyNote.new(content: "foo\nbar\nbaz",
                                            tags: ['one', 'two', 'three'],
                                            timestamp: Time.now,
                                            title: 'title')
    end
    let(:formatted_note) { SimplenoteConstructor::PlainTextFormatter.format(note) }

    context 'header' do
      it 'converts the note`s timestamp to simplenote format' do
        SimplenoteConstructor::DateTimeFormatter.should_receive(:timestamp).with(note.timestamp)

        formatted_note
      end

      it 'prints a `created` timestamp' do
        SimplenoteConstructor::DateTimeFormatter.stub(timestamp: 'timestamp')

        expect(formatted_note).to match(/^Note Created: timestamp$/)
      end
{'fraction_non_alphanumeric': 0.09758771929824561, 'fraction_numerical': 0.0, 'mean_word_length': 2.430451127819549, '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': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4042317', 'n_tokens_mistral': 481, 'n_tokens_neox': 470, 'n_words': 101}