Merge branch 'master' of http://github.com/magnars/jstdutil
[jstestdriver-utilities:jstdutil.git] / test / redgreen_test.rb
1 require "test_helper"
2
3 class RedGreenTest < Test::Unit::TestCase
4   context "adding pretty colors" do
5
6     should "wrap in green" do
7       assert_equal "\e[32mtrees\e[0m", Jstdutil::RedGreen::Color.green("trees")
8     end
9
10     should "wrap in red" do
11       assert_equal "\e[31mdress\e[0m", Jstdutil::RedGreen::Color.red("dress")
12     end
13
14   end
15   
16   context "wrapping report" do
17
18     should "add nothing" do
19       assert_equal "bare", Jstdutil::RedGreen.wrap_report("bare")
20     end
21
22   end
23 end