Sha256: dbc4c366182d71d98619754121a78ee55a360f3fadf73b5a2b2313ddf813894b

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.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

10 entries across 10 versions & 1 rubygems

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