Sha256: ea84200cac69f3a209699de1d14fbd4d8096760868332d2fef53c031677bec31

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'spec_helper'

describe TTY::Table::ColumnSet, '#extract_widths!' do
  let(:header) { ['h1', 'h2', 'h3'] }
  let(:rows)   { [['a1', 'a2', 'a3'], ['b1', 'b2', 'b3']] }
  let(:table)  { TTY::Table.new header, rows }

  subject { described_class.new table }

  it 'extract widths' do
    expect(subject.extract_widths).to eql([2,2,2])
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tty-0.0.10 spec/tty/table/column_set/extract_widths_spec.rb