Sha256: 23faf2e23061dc0867c9e61a129c7c4e5674e9674953e4ec08a8d057c0c1989c
Contents?: true
Size: 392 Bytes
Versions: 1
Compression:
Stored size: 392 Bytes
Contents
require 'test/unit' require 'mega/ansicolor' class TC_ANSIColor < Test::Unit::TestCase include ANSIColor 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mega-0.3.1 | test/tc_ansicolor.rb |