Sha256: 8f256052d8f9ffa0c9510f972e1fdbe6b774ac2bca09b5bfd2e15de2ec2bf53b

Contents?: true

Size: 433 Bytes

Versions: 3

Compression:

Stored size: 433 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Table, '#empty?' do
  let(:header) { ['Header1', 'Header2'] }
  let(:object) { described_class.new header, rows }

  subject { object.empty? }

  context 'with rows containing no entries' do
    let(:rows) { [] }

    it { is_expected.to eq(true) }
  end

  context 'with rows containing an entry' do
    let(:rows) { [['a1']] }

    it { is_expected.to eq(false) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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