Sha256: 9bf0273b1c91e9311a2303d3db50874b358f459f6d2b2188d6028ad7711b49c0

Contents?: true

Size: 516 Bytes

Versions: 2

Compression:

Stored size: 516 Bytes

Contents

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

require 'spec_helper'

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

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

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

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

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

    it { should be_instance_of klass }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tty-0.0.11 spec/tty/table/border/new_spec.rb
tty-0.0.10 spec/tty/table/border/new_spec.rb