Sha256: cbf3ac7ac15e1a84b086302a251c1e4b0509be7c101540fbda839469fbb84333

Contents?: true

Size: 1.11 KB

Versions: 2

Compression:

Stored size: 1.11 KB

Contents

require 'test_helper'

module Vedeu

  describe Output do

    let(:described) { Output.new(interface) }
    let(:interface) {
      Interface.build do
        geometry do
          height 3
          width  32
        end
        name 'flourine'
      end
    }
    let(:lines) {
      [
        Line.new([Stream.new('this is the first')]),
        Line.new([Stream.new('this is the second and it is long')]),
        Line.new([Stream.new('this is the third, it is even longer and still truncated')]),
        Line.new([Stream.new('this should not render')]),
      ]
    }

    before do
      interface.lines = lines
      IO.console.stubs(:print)
    end

    describe '#initialize' do
      it { described.must_be_instance_of(Output) }
      it { described.instance_variable_get('@interface').must_equal(interface) }
    end

    describe '.render' do
      subject { Output.render(interface) }

      it { subject.must_be_instance_of(Array) }

      context 'when a border is defined for the interface' do
      end

      context 'when a border is not defined for the interface' do
      end
    end

  end # Output

end # Vedeu

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vedeu-0.3.1 test/lib/vedeu/output/output_test.rb
vedeu-0.3.0 test/lib/vedeu/output/output_test.rb