Sha256: 9036aa5c539a8131806c6071744a0756f0f2cd7776bb43675fd12b332213a84d

Contents?: true

Size: 543 Bytes

Versions: 10

Compression:

Stored size: 543 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table, 'options' do
  let(:rows)   { [['a1', 'a2'], ['b1', 'b2']] }
  let(:widths) { nil }
  let(:aligns) { [] }
  let(:object) { described_class }
  let(:options) {
    {
      column_widths: widths,
      column_aligns: aligns,
      renderer: :basic
    }
  }

  subject(:table) { object.new rows, options }

  it { expect(table.header).to be_nil }

  it { expect(table.rows).to eq(rows) }

  it { expect(table.orientation).to be_kind_of TTY::Table::Orientation::Horizontal }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tty-table-0.10.0 spec/unit/options_spec.rb
tty-table-0.9.0 spec/unit/options_spec.rb
tty-table-0.8.0 spec/unit/options_spec.rb
tty-table-0.7.0 spec/unit/options_spec.rb
tty-table-0.6.0 spec/unit/options_spec.rb
tty-table-0.5.0 spec/unit/options_spec.rb
tty-table-0.4.0 spec/unit/options_spec.rb
tty-table-0.3.0 spec/unit/options_spec.rb
tty-table-0.2.0 spec/unit/options_spec.rb
tty-table-0.1.0 spec/unit/options_spec.rb