Sha256: 58584e525ad4389efe6b46025415b0be8fe63fb10b0b28bdc177713feea1ab82

Contents?: true

Size: 670 Bytes

Versions: 17

Compression:

Stored size: 670 Bytes

Contents

require "test_helper"

class ColorfulHtmlTest < Test::Unit::TestCase
  context "adding pretty colors" do

    should "wrap in green" do
      assert_equal "<span class='green'>trees</span>", Jstdutil::ColorfulHtml::Color.green("trees")
    end

    should "wrap in red" do
      assert_equal "<span class='red'>dress</span>", Jstdutil::ColorfulHtml::Color.red("dress")
    end

  end
  
  context "wrapping report" do
    
    should "add styles and pre" do
      assert_equal "<style>.red {color: #c00;} .green {color: #0c0;} .yellow {color: #ff0;} </style><pre>present</pre>",
                   Jstdutil::ColorfulHtml.wrap_report("present")
    end
    
  end
  
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
jstdutil-0.3.13 test/colorful_html_test.rb
jstdutil-0.3.12 test/colorful_html_test.rb
jstdutil-0.3.11 test/colorful_html_test.rb
jstdutil-0.3.10 test/colorful_html_test.rb
jstdutil-0.3.9 test/colorful_html_test.rb
jstdutil-0.3.8 test/colorful_html_test.rb
jstdutil-0.3.7 test/colorful_html_test.rb
jstdutil-0.3.6 test/colorful_html_test.rb
jstdutil-0.3.5 test/colorful_html_test.rb
jstdutil-0.3.4 test/colorful_html_test.rb
jstdutil-0.3.3 test/colorful_html_test.rb
jstdutil-0.3.2 test/colorful_html_test.rb
jstdutil-0.3.1 test/colorful_html_test.rb
jstdutil-0.3.0 test/colorful_html_test.rb
jstdutil-0.2.2 test/colorful_html_test.rb
jstdutil-0.2.1 test/colorful_html_test.rb
jstdutil-0.2.0 test/colorful_html_test.rb