Sha256: b0876bf5cbbd5db528a589996f052c37d8528f04905d08ebaca4b34418acc0cc
Contents?: true
Size: 659 Bytes
Versions: 2
Compression:
Stored size: 659 Bytes
Contents
require_relative 'test_helper' require_relative '../lib/lovely_rufus' describe LovelyRufus do describe '.wrap' do let(:text_wrapper) { fake(:text_wrapper, as: :class) } it 'offloads the wrapping to TextWrapper' do stub(text_wrapper).wrap('Ice Ice Baby', width: 7) { "Ice Ice\nBaby\n" } _(LovelyRufus.wrap('Ice Ice Baby', text_wrapper: text_wrapper, width: 7)) .must_equal "Ice Ice\nBaby\n" end it 'wraps the passed String to 72 characters by default' do LovelyRufus.wrap 'Ice Ice Baby', text_wrapper: text_wrapper _(text_wrapper).must_have_received :wrap, ['Ice Ice Baby', { width: 72 }] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lovely_rufus-1.0.0 | test/lovely_rufus_test.rb |
lovely_rufus-0.3.2 | test/lovely_rufus_test.rb |