Sha256: 34eeceef5b6f653142d6fab3af94e9781d83932b51f50843cdbb028a4a872a9a
Contents?: true
Size: 547 Bytes
Versions: 6
Compression:
Stored size: 547 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe TTY::Shell, '#print_table' do let(:input) { StringIO.new } let(:output) { StringIO.new } let(:header) { ['h1', 'h2'] } let(:rows) { [['a1', 'a2'], ['b1', 'b2']] } subject(:shell) { TTY::Shell.new(input, output) } it 'prints a table' do shell.print_table header, rows, :renderer => :ascii expect(output.string).to eql <<-EOS.normalize +--+--+ |h1|h2| +--+--+ |a1|a2| |b1|b2| +--+--+\n EOS end end # print_table
Version data entries
6 entries across 6 versions & 1 rubygems