summaryrefslogtreecommitdiff
path: root/test/unit/html.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-06-13 01:03:13 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2016-06-13 01:03:13 +0200
commitc999deb1e932b3290561a58923603eb87809c8df (patch)
tree68f38f96886aeef5f5a27d4352aec53106056658 /test/unit/html.rb
parent351822b9e9ed27d0b58c39ad93dba9bf64615920 (diff)
downloadcoderay-c999deb1e932b3290561a58923603eb87809c8df.tar.gz
fix tests
Diffstat (limited to 'test/unit/html.rb')
-rw-r--r--test/unit/html.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/unit/html.rb b/test/unit/html.rb
index 750b6c9..9175a4f 100644
--- a/test/unit/html.rb
+++ b/test/unit/html.rb
@@ -3,6 +3,10 @@ require 'coderay'
class HtmlTest < Test::Unit::TestCase
+ def normalize_html html
+ html.gsub('&#39;', "'").gsub('&quot;', '"')
+ end
+
def test_break_lines_option
snippets = {}
@@ -95,9 +99,9 @@ public class Test {
for lang, code in snippets
tokens = CodeRay.scan code[:in], lang
- assert_equal code[:expected_with_option_off], tokens.html
- assert_equal code[:expected_with_option_off], tokens.html(:break_lines => false)
- assert_equal code[:expected_with_option_on], tokens.html(:break_lines => true)
+ assert_equal code[:expected_with_option_off], normalize_html(tokens.html)
+ assert_equal code[:expected_with_option_off], normalize_html(tokens.html(:break_lines => false))
+ assert_equal code[:expected_with_option_on], normalize_html(tokens.html(:break_lines => true))
end
end
end