summaryrefslogtreecommitdiff
path: root/test/functional/for_redcloth.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-06-13 01:07:56 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2016-06-13 01:07:56 +0200
commite01ccf7c5f1da22d2d131a84d36eeebdebe92f1c (patch)
tree0faa2550f16eb8899a1681a11a56dd8c7c5d07ab /test/functional/for_redcloth.rb
parent545398fac57b5949359298e1f258e1746adfa3e5 (diff)
parentc999deb1e932b3290561a58923603eb87809c8df (diff)
downloadcoderay-e01ccf7c5f1da22d2d131a84d36eeebdebe92f1c.tar.gz
Merge branch 'possible-speedups' into dsl
Diffstat (limited to 'test/functional/for_redcloth.rb')
-rw-r--r--test/functional/for_redcloth.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/for_redcloth.rb b/test/functional/for_redcloth.rb
index eebf19c..50fc50c 100644
--- a/test/functional/for_redcloth.rb
+++ b/test/functional/for_redcloth.rb
@@ -14,16 +14,20 @@ end
class BasicTest < Test::Unit::TestCase
+ def normalize_html html
+ html.gsub('&#39;', "'").gsub('&quot;', '"')
+ end
+
def test_for_redcloth
require 'coderay/for_redcloth'
assert_equal "<p><span lang=\"ruby\" class=\"CodeRay\">puts <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">\"</span><span style=\"color:#D20\">Hello, World!</span><span style=\"color:#710\">\"</span></span></span></p>",
- RedCloth.new('@[ruby]puts "Hello, World!"@').to_html
+ normalize_html(RedCloth.new('@[ruby]puts "Hello, World!"@').to_html)
assert_equal <<-BLOCKCODE.chomp,
<div lang="ruby" class="CodeRay">
<div class="code"><pre>puts <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">"</span><span style="color:#D20">Hello, World!</span><span style="color:#710">"</span></span></pre></div>
</div>
BLOCKCODE
- RedCloth.new('bc[ruby]. puts "Hello, World!"').to_html
+ normalize_html(RedCloth.new('bc[ruby]. puts "Hello, World!"').to_html)
end
def test_for_redcloth_no_lang