Sha256: 9d9b48c71a7782d9917e29d6ed31ac14ef0cc0038a5199350dfcc9f5957684d6
Contents?: true
Size: 1.13 KB
Versions: 2
Compression:
Stored size: 1.13 KB
Contents
require 'test_helper' module Vedeu describe Presentation do let(:receiver) { PresentationTestClass.new } describe '#colour' do it 'returns a Colour instance' do receiver.colour.must_be_instance_of(Colour) end end describe '#style' do it 'returns a Style instance' do receiver.style.must_be_instance_of(Style) end end describe '#to_s' do it 'returns output' do line = Line.new({ colour: { foreground: '#00ff00', background: '#000000' }, style: 'normal' }) stream = Stream.new({ colour: { foreground: '#ff0000', background: '#000000' }, text: 'Some text', style: 'underline', width: nil, align: :left, parent: line.view_attributes, }) stream.to_s.must_equal( "\e[38;2;255;0;0m\e[48;2;0;0;0m" \ "\e[4m" \ "Some text" \ "\e[24m\e[22m\e[27m" \ "\e[38;2;0;255;0m\e[48;2;0;0;0m" ) end end end # Presentation end # Vedeu
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.2.12 | test/lib/vedeu/support/presentation_test.rb |
vedeu-0.2.11 | test/lib/vedeu/support/presentation_test.rb |