# File test/entity.rb, line 60 def test_constructor one = [ }<!ENTITY % YN '"Yes"'>}, }<!ENTITY % YN "Yes">}, }<!ENTITY WhatHeSaid "He said %YN;">}, '<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">', '<!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">', '<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>' ] one.each do |string| source = REXML::Source.new(string) e = REXML::Entity.new(source) str = string.tr("\r\n\t", ' ').squeeze(" ") assert_equals str, e.to_s end end