Sha256: 358031b9d3a055036b79661868289add51d726617a3bf90160def3963b02dca6

Contents?: true

Size: 465 Bytes

Versions: 4

Compression:

Stored size: 465 Bytes

Contents

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

require 'spec_helper'

describe TTY::Table::Header, '#new' do
  let(:object) { described_class }

  context 'with no arguments' do
    subject { object.new }

    it { should be_instance_of(object) }

    it { should be_empty }
  end

  context 'with attributes' do
    subject { object.new(attributes) }

    let(:attributes) { ['id', 'name', 'age'] }

    it { should be_instance_of(object) }

    it { should == attributes }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tty-0.0.11 spec/tty/table/header/new_spec.rb
tty-0.0.10 spec/tty/table/header/new_spec.rb
tty-0.0.9 spec/tty/table/header/new_spec.rb
tty-0.0.8 spec/tty/table/header/new_spec.rb