test/compressor_test.rb in htmlcompressor-0.1.2 vs test/compressor_test.rb in htmlcompressor-0.2.0
- old
+ new
@@ -80,11 +80,11 @@
def test_compress
source = read_resource("testCompress.html")
result = read_resource("testCompressResult.html")
- compressor = Compressor.new
+ compressor = Compressor.new(:compress_js_templates => true)
assert_equal result, compressor.compress(source)
end
def test_simple_doctype
@@ -202,9 +202,16 @@
source = read_resource("testPreserveTextareas.html")
result = read_resource("testPreserveTextareasResult.html")
compressor = Compressor.new
+ assert_equal result, compressor.compress(source)
+ end
+
+ def test_compress_custom_html_templates
+ source = read_resource("testCompressCustomHtmlTemplates.html")
+ result = read_resource("testCompressCustomHtmlTemplatesResult.html")
+ compressor = Compressor.new(:compress_js_templates => ['text/html'], :remove_quotes => true)
assert_equal result, compressor.compress(source)
end
end