Sha256: e398eed68096742eb97539b16af33ede3e5841b7bc50a90b5d00cb7dbbe9320c

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

3 entries across 3 versions & 1 rubygems

Version Path
tty-0.1.2 spec/tty/table/options_spec.rb
tty-0.1.1 spec/tty/table/options_spec.rb
tty-0.1.0 spec/tty/table/options_spec.rb