Sha256: 3c03e5f2663e4c2083bef2a23404d446f0a946771e1c959bd512ed2948fac675
Contents?: true
Size: 578 Bytes
Versions: 3
Compression:
Stored size: 578 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe TTY::Table::Indentation, '#insert_indent' do let(:indent) { 2 } let(:renderer) { double(:renderer, indent: indent) } let(:object) { described_class.new(renderer) } subject { object.insert_indent(part) } context 'when enumerable' do let(:part) { ['line1'] } it 'inserts indentation for each element' do expect(subject[0]).to eql(' line1') end end context 'when string' do let(:part) { 'line1' } it 'inserts indentation' do expect(subject).to eql(' line1') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tty-0.1.2 | spec/tty/table/indentation/insert_indent_spec.rb |
tty-0.1.1 | spec/tty/table/indentation/insert_indent_spec.rb |
tty-0.1.0 | spec/tty/table/indentation/insert_indent_spec.rb |