Sha256: 42d1fda36c6ac70191e121e3f3785296dca678b4f679464422d3271111881038
Contents?: true
Size: 655 Bytes
Versions: 6
Compression:
Stored size: 655 Bytes
Contents
# encoding: utf-8 class Nanoc::Helpers::HTMLEscapeTest < Nanoc::TestCase include Nanoc::Helpers::HTMLEscape def test_html_escape_with_string assert_equal('<', html_escape('<')) assert_equal('>', html_escape('>')) assert_equal('&', html_escape('&')) assert_equal('"', html_escape('"')) end def test_html_escape_with_block _erbout = 'moo' html_escape do _erbout << '<h1>Looks like a header</h1>' end assert_equal 'moo<h1>Looks like a header</h1>', _erbout end def test_html_escape_without_string_or_block assert_raises RuntimeError do h end end end
Version data entries
6 entries across 6 versions & 1 rubygems