Sha256: f9300a47b992363239df8a9b2ba23cd165e427ecc4f392ff555a1c500489c0a8

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require 'test_helper'

module Vedeu
  module API
    describe Composition do
      describe '.render' do
        it 'directly writes a view buffer to the terminal' do
          skip
        end
      end


      describe '#view' do
        it 'allows a single view to be defined' do
          skip
        end
      end

      describe '#views' do
        it 'allows multiple views to be defined at once' do
          attrs = Vedeu.views do
            view 'view_1' do
              line do
                text '1. A line of text in view 1.'
                text '2. Another line of text in view 1.'
              end
            end
            view 'view_2' do
              line do
                text '1. A line of text in view 2.'
                text '2. Another line of text in view 2.'
              end
            end
          end
          attrs[:interfaces].size.must_equal(2)
        end

        it 'raises an exception when a block is not given' do
          proc { Vedeu.views }.must_raise(InvalidSyntax)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.2.3 test/lib/vedeu/api/composition_test.rb
vedeu-0.2.2 test/lib/vedeu/api/composition_test.rb
vedeu-0.2.1 test/lib/vedeu/api/composition_test.rb