Sha256: ff5e7002dffcbb591f30146169cd1dd780a569f3bb7e01dde684aff542490755

Contents?: true

Size: 455 Bytes

Versions: 2

Compression:

Stored size: 455 Bytes

Contents

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

require 'spec_helper'

describe TTY::Table, 'properties' do
  let(:rows) {[['a1', 'a2', 'a3'], ['b1', 'b2', 'c3']] }
  subject { described_class.new rows }

  its(:width) { should == 6 }

  its(:row_size) { should == 2 }

  its(:column_size)  { should == 3 }

  its(:size) { should == [2,3] }

  context 'no size' do
    let(:rows) { []  }

    its(:row_size)    { should == 0 }

    its(:column_size) { should == 0 }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tty-0.0.11 spec/tty/table/properties_spec.rb
tty-0.0.10 spec/tty/table/properties_spec.rb