Sha256: b12d2f9e537c5e74c6bbe8be53f3b55fb55aaccdf7c7a06a2051ab07ab02c694
Contents?: true
Size: 522 Bytes
Versions: 17
Compression:
Stored size: 522 Bytes
Contents
require 'test_helper' require 'ansi/code' testcase ANSI::Code do unit :red do str = ANSI::Code.red out = "\e[31m" out.assert == str end unit :red => "with block notation" do str = ANSI::Code.red { "Hello" } out = "\e[31mHello\e[0m" out.assert == str end unit :blue do str = ANSI::Code.blue out = "\e[34m" out.assert == str end unit :blue => "with block notation" do str = ANSI::Code.blue { "World" } out = "\e[34mWorld\e[0m" out.assert == str end end
Version data entries
17 entries across 17 versions & 5 rubygems