diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2016-06-13 01:03:13 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2016-06-13 01:03:13 +0200 |
commit | c999deb1e932b3290561a58923603eb87809c8df (patch) | |
tree | 68f38f96886aeef5f5a27d4352aec53106056658 /test/unit/html.rb | |
parent | 351822b9e9ed27d0b58c39ad93dba9bf64615920 (diff) | |
download | coderay-c999deb1e932b3290561a58923603eb87809c8df.tar.gz |
fix tests
Diffstat (limited to 'test/unit/html.rb')
-rw-r--r-- | test/unit/html.rb | 10 |
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(''', "'").gsub('"', '"') + 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 |