Sha256: d01a09e8addd545d14af90281cd872b73f9b878fd602d559d4d62a96cf217e57

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

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

module Vedeu
  describe Foreground do
    describe '#foreground' do
      it 'returns an escape sequence' do
        Colour.new({ foreground: '#ff0000' }).foreground
          .must_equal("\e[38;5;196m")
      end

      it 'returns an empty string when the foreground is missing' do
        Colour.new.foreground.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/foreground_test.rb