Class TestHtmlEncode
In: lib/html_encode.rb
Parent: ::Test::Unit::TestCase

Methods

Public Instance methods

[Source]

# File lib/html_encode.rb, line 170
    def setup
      @str = '<fo"o>béaÔr'
    end

[Source]

# File lib/html_encode.rb, line 174
    def teardown
    end

[Source]

# File lib/html_encode.rb, line 177
    def test_html_encode
      assert_equal "&lt;fo&quot;o&gt;béaÔr", @str.html_encode
    end

[Source]

# File lib/html_encode.rb, line 185
    def test_html_encode_latin1
      assert_equal '&lt;fo&quot;o&gt;b&eacute;a&Ocirc;r', @str.html_encode_latin1
    end

[Source]

# File lib/html_encode.rb, line 181
    def test_html_encode_latin1_accents
      assert_equal '<fo"o>b&eacute;a&Ocirc;r', @str.html_encode_latin1_accents
    end

[Validate]