Sha256: e301cf45cbef9f4bf2f409f719a7078707180b8e0010235d05d59fca5ab2bc0e
Contents?: true
Size: 595 Bytes
Versions: 3
Compression:
Stored size: 595 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe TTY::Table::Operation::Wrapped, '#wrap' do let(:padding) { TTY::Table::Padder.parse } let(:instance) { described_class.new([], padding) } let(:text) { 'ラドクリフ、マラソン五輪代表に1万m出場にも含み' } subject { instance.wrap(text, width) } context 'without wrapping' do let(:width) { 8 } it { is_expected.to eq("ラドクリフ、マラ\nソン五輪代表に1\n万m出場にも含み") } end context 'with wrapping' do let(:width) { 100 } it { is_expected.to eq(text) } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tty-0.1.2 | spec/tty/table/operation/wrapped/wrap_spec.rb |
tty-0.1.1 | spec/tty/table/operation/wrapped/wrap_spec.rb |
tty-0.1.0 | spec/tty/table/operation/wrapped/wrap_spec.rb |