Sha256: db268a45732b2fdf68dbf2fbf3913ae445134da9d2b86b20edc33c6ee667839a

Contents?: true

Size: 518 Bytes

Versions: 1

Compression:

Stored size: 518 Bytes

Contents

require_relative '../../../test_helper'
require_relative '../../../../lib/vedeu/models/background'
require_relative '../../../../lib/vedeu/models/colour'

module Vedeu
  describe Background do
    describe '#background' do
      it 'returns an escape sequence' do
        Colour.new({
          background: '#00ff00'
        }).background.must_equal("\e[48;5;46m")
      end

      it 'returns an empty string when the foreground is missing' do
        Colour.new.background.must_equal('')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.31 test/lib/vedeu/models/background_test.rb