Sha256: 9e92205403163883d8dbdb0eba570639e3f28db879edcf5a18143b6c40bccd48

Contents?: true

Size: 350 Bytes

Versions: 9

Compression:

Stored size: 350 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table::Header, '#new' do

  it "is empty without arguments" do
    header = TTY::Table::Header.new
    expect(header).to be_empty
  end

  it "isn't empty with attributes" do
    header = TTY::Table::Header.new [:id, :name, :age]
    expect(header.to_a).to eq([:id, :name, :age])
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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