Sha256: 263cd5adbf05e776fc250ee8e663bf1e814093210052d2fbbfea55c02ee67df0

Contents?: true

Size: 531 Bytes

Versions: 9

Compression:

Stored size: 531 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table::Border, '#new' do
  let(:row) { [] }

  subject(:instance) { klass.new row, [0,0,0,0] }

  context 'when abstract' do
    let(:klass) { described_class }

    it { expect { instance }.to raise_error(NotImplementedError) }
  end

  context 'when concrete' do
    let(:klass) {
      Class.new do
        def initialize(row, padding); end
      end
    }

    it { expect { instance }.to_not raise_error() }

    it { is_expected.to be_instance_of klass }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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