File: interoperability_test.rb

package info (click to toggle)
ruby-htmlentities 4.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 316 kB
  • sloc: ruby: 2,235; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# encoding: UTF-8
require_relative "./test_helper"

if ENV["RUN_INTEROPERABILITY_TESTS"]
  class HTMLEntities::InteroperabilityTest < Test::Unit::TestCase

    def test_should_encode_active_support_safe_buffer
      require 'active_support'
      string = "<p>This is a test</p>"
      buffer = ActiveSupport::SafeBuffer.new(string)
      coder = HTMLEntities.new
      assert_equal coder.encode(string, :named), coder.encode(buffer, :named)
    end
  end
end