Sha256: e90a8c227e2f44033695c9edacc390e9ba4793a105048a1879577f38a1b758bc
Contents?: true
Size: 389 Bytes
Versions: 14
Compression:
Stored size: 389 Bytes
Contents
require 'test/unit' require 'facets/ansicode' class TestANSICode < Test::Unit::TestCase include ANSICode def test_methods str = red + "Hello" + blue + "World" out = "\e[31mHello\e[34mWorld" assert_equal( out, str ) end def test_blocks str = red { "Hello" } + blue { "World" } out = "\e[31mHello\e[0m\e[34mWorld\e[0m" assert_equal( out, str ) end end
Version data entries
14 entries across 14 versions & 1 rubygems