Sha256: 143049fc2776e35d8f68b2f314bd8ac78b013d34618418fb9c62900df60b93c2

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

require 'test_helper'

module Vedeu
  describe Line do
    let(:line)       { Line.new(attributes) }
    let(:attributes) {
      {
        colour: {
          foreground: '#ff0000',
          background: '#000000'
        },
        streams: [],
        style:   'normal'
      }
    }

    describe '#attributes' do
      it 'returns the attributes' do
        line.attributes.must_equal(attributes)
      end
    end

    describe '#streams' do
      it 'has a streams attribute' do
        line.streams.must_equal([])
      end
    end

    describe '#to_s' do
      it 'returns a String' do
        line.to_s.must_equal(
          "\e[38;2;255;0;0m\e[48;2;0;0;0m" \
          "\e[24m\e[22m\e[27m"
        )
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.1.18 test/lib/vedeu/models/line_test.rb
vedeu-0.1.17 test/lib/vedeu/models/line_test.rb
vedeu-0.1.16 test/lib/vedeu/models/line_test.rb