test/test_html_markup.rb in wunderbar-0.8.2 vs test/test_html_markup.rb in wunderbar-0.8.3

- old
+ new

@@ -3,12 +3,18 @@ require 'wunderbar' class HtmlMarkupTest < Test::Unit::TestCase def setup $x = nil # until this hack is removed html-methods.rb + @original_log_level = Wunderbar.logger.level + Wunderbar.log_level = :fatal end + def teardown + Wunderbar.logger.level = @original_log_level + end + def test_html x = HtmlMarkup.new x.html {} assert_equal %{<html>\n</html>\n}, x.target! end @@ -115,6 +121,19 @@ def test_declare x = HtmlMarkup.new x.declare! :DOCTYPE, 'html' assert_equal %{<!DOCTYPE "html">\n}, x.target! end + + begin + require 'coffee-script' + + def test_coffeescript + x = HtmlMarkup.new + x.html {_coffeescript 'alert "foo"'} + assert_match %r[<script\slang="text/javascript">\s+\(function\(\)\s + \{\s+alert\("foo"\);\s+\}\).call\(this\);\s+</script>]x, x.target! + end + rescue LoadError + end + end