<commit_before>require_relative '../test_helper'
require_relative '../../lib/lovely_rufus/wrap'

module LovelyRufus
  describe Wrap do
    describe '.[]' do
      it 'creates a Wrap with the given text and target width' do
        Wrap['Ice Ice Baby', width: 7].text.must_equal 'Ice Ice Baby'
        Wrap['Ice Ice Baby', width: 7].width.must_equal 7
      end

      it 'defaults to empty text and width of 72' do
        Wrap[].text.must_equal ''
        Wrap[].width.must_equal 72
      end
    end

    describe '#lines' do
      it 'accesses the lines of the text' do
        Wrap["all right: stop,\ncollaborate and listen\n"].lines.must_equal [
          "all right: stop,\n", "collaborate and listen\n"
        ]
      end
    end

    describe '#text' do
      it 'accesses the text of the Wrap' do
        Wrap['Ice Ice Baby', width: 7].text.must_equal 'Ice Ice Baby'
      end
    end

    describe '#width' do
      it 'accesses the target width of the Wrap' do
        Wrap['Ice Ice Baby', width: 7].width.must_equal 7
      end
    end
  end
end
<commit_msg>port Wrap test to Expectation syntax<commit_after>require_relative '../test_helper'
require_relative '../../lib/lovely_rufus/wrap'

module LovelyRufus
  describe Wrap do
    describe '.[]' do
      it 'creates a Wrap with the given text and target width' do
        _(Wrap['Ice Ice Baby', width: 7].text).must_equal 'Ice Ice Baby'
        _(Wrap['Ice Ice Baby', width: 7].width).must_equal 7
      end

      it 'defaults to empty text and width of 72' do
        _(Wrap[].text).must_equal ''
        _(Wrap[].width).must_equal 72
      end
    end

    describe '#lines' do
      it 'accesses the lines of the text' do
        _(Wrap["all right: stop,\ncollaborate and listen\n"].lines).must_equal [
          "all right: stop,\n", "collaborate and listen\n"
        ]
      end
    end

    describe '#text' do
      it 'accesses the text of the Wrap' do
        _(Wrap['Ice Ice Baby', width: 7].text).must_equal 'Ice Ice Baby'
      end
    end

    describe '#width' do
      it 'accesses the target width of the Wrap' do
        _(Wrap['Ice Ice Baby', width: 7].width).must_equal 7
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10612991765782251, 'fraction_numerical': 0.009149130832570906, 'mean_word_length': 2.2936746987951806, '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': '338651', 'n_tokens_mistral': 720, 'n_tokens_neox': 674, 'n_words': 245}