Sha256: 8dfeca6edc16d94d0e72e91bc1dba68b95124fc5af0e33f54fd9f997bf150abe

Contents?: true

Size: 314 Bytes

Versions: 6

Compression:

Stored size: 314 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'spec_helper'

describe TTY::Terminal, '#color' do

  it { should respond_to(:color) }

  its(:color) { should be_kind_of TTY::Terminal::Color}

  it 'delegates color handling' do
    string = 'text'
    subject.color.set(string, :red).should == "\e[31m#{string}\e[0m"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tty-0.0.11 spec/tty/terminal/color_spec.rb
tty-0.0.10 spec/tty/terminal/color_spec.rb
tty-0.0.9 spec/tty/terminal/color_spec.rb
tty-0.0.8 spec/tty/terminal/color_spec.rb
tty-0.0.7 spec/tty/terminal/color_spec.rb
tty-0.0.6 spec/tty/terminal/color_spec.rb