Sha256: b42535e81fa74e9eb8a6fc07866ac31bc29042874ca143d3f0b79fa2f8ca7e48
Contents?: true
Size: 848 Bytes
Versions: 5
Compression:
Stored size: 848 Bytes
Contents
require_relative '../../../test_helper' require_relative '../../../../lib/vedeu/models/background' require_relative '../../../../lib/vedeu/models/colour' module Vedeu describe Background do let(:described_class) { Background } let(:described_instance) { Vedeu::Colour.new(attributes) } let(:attributes) { { background: '#00ff00' } } describe '#background' do let(:subject) { described_instance.background } it 'returns a String' do subject.must_be_instance_of(String) end it 'returns an escape sequence' do subject.must_equal("\e[48;5;46m") end context 'when the foreground is missing' do let(:attributes) { {} } it 'returns an escape sequence' do subject.must_equal('') end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems