Sha256: 5e9c59c06c3b14d15b80978dce4212c2fb344845eb5c030899eefd4b0593c9f7
Contents?: true
Size: 1.06 KB
Versions: 7
Compression:
Stored size: 1.06 KB
Contents
require 'test_helper' module Vedeu describe Char do let(:char) { Char.new(attributes) } let(:attributes) { { colour: { foreground: '#ffff00', background: '#0000ff' }, parent: { colour: { foreground: '#00ff00', background: '#ff00ff' }, style: [] }, style: [], value: value, } } let(:value) { 'a' } describe '#initialize' do it 'returns a new instance of Char' do char.must_be_instance_of(Char) end end describe '#to_s' do it 'returns a String' do char.to_s.must_be_instance_of(String) end it 'returns the escape sequences and content' do # - char colours and style as set in Stream#chars. # - the value. # - the colours and style of the line which the Char belongs to. char.to_s.must_equal( "\e[38;2;255;255;0m\e[48;2;0;0;255m" \ "a" \ "\e[38;2;0;255;0m\e[48;2;255;0;255m" ) end end end # Char end # Vedeu
Version data entries
7 entries across 7 versions & 1 rubygems