Sha256: e3a0cc52ecd3bc26c25377593623ace3ef136f59e4315ee16842e89a0046d499

Contents?: true

Size: 387 Bytes

Versions: 10

Compression:

Stored size: 387 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table::Header, '#set' do
  let(:object) { described_class }
  let(:attributes) { [:id, :name, :age] }

  subject(:header) { object.new }

  it 'sets the value' do
    header[0] = :id
    expect(header[0]).to eql(:id)
  end

  it 'gets the value' do
    head = object.new [{value: :id}]
    expect(head[0]).to eq(:id)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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