Sha256: 8e86951d4d8c08f9483969177ce4b9ba19e83d7d4f8fcf175c0debc7d07daf94

Contents?: true

Size: 515 Bytes

Versions: 10

Compression:

Stored size: 515 Bytes

Contents

# coding: utf-8

require 'spec_helper'

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

  subject { object.height }

  context 'single row' do
    let(:header) { ['h1', 'h1'] }

    it { expect(subject).to eql(1) }
  end

  context 'non escaped multiline' do
    let(:header) { ["h1\nh1\nh1", 'h2'] }

    it { expect(subject).to eql(3)}
  end

  context 'escaped multiline' do
    let(:header) { ["h1\\h1\\h1", 'h2'] }

    it { expect(subject).to eql(1) }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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