Sha256: afe8a9e7b6e98f22f135f5d7605157bf46cdef179709fba656513d8e7bbee05a

Contents?: true

Size: 364 Bytes

Versions: 8

Compression:

Stored size: 364 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.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.total_width).to eql(6)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tty-table-0.8.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.7.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.6.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.5.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.4.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.3.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.2.0 spec/unit/column_set/total_width_spec.rb
tty-table-0.1.0 spec/unit/column_set/total_width_spec.rb