Sha256: 0fdf70540fb08f014ce329abf46fc21721c6575524cd7cc44731e079424aca76

Contents?: true

Size: 688 Bytes

Versions: 3

Compression:

Stored size: 688 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Table::Renderer::Unicode, 'with separator' do
  let(:header) { ['h1', 'h2', 'h3'] }
  let(:rows)   { [['a1', 'a2', 'a3'], ['b1', 'b2', 'b3']] }
  let(:table)  { TTY::Table.new(header, rows) }

  let(:object) { described_class.new table }

  subject(:renderer) { object }

  it "renders each row" do
    renderer.border.separator= :each_row
    expect(renderer.render).to eq <<-EOS.normalize
      ┌──┬──┬──┐
      │h1│h2│h3│
      ├──┼──┼──┤
      │a1│a2│a3│
      ├──┼──┼──┤
      │b1│b2│b3│
      └──┴──┴──┘
    EOS
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tty-0.1.2 spec/tty/table/renderer/unicode/separator_spec.rb
tty-0.1.1 spec/tty/table/renderer/unicode/separator_spec.rb
tty-0.1.0 spec/tty/table/renderer/unicode/separator_spec.rb