From ce4befa48818ef11eea2ce06f3cf9f1ad3e2f741 Mon Sep 17 00:00:00 2001 From: kou Date: Fri, 25 Nov 2005 01:33:50 +0000 Subject: * test/rss/test_2.0.rb: added RSS 2.0 tests. * test/rss/rss-assertions.rb: extended XML stylesheet assertion. * lib/rss/0.9.rb: added initialize method. * test/rss/test_1.0.rb: cleanup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rss/rss-assertions.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/rss/rss-assertions.rb') diff --git a/test/rss/rss-assertions.rb b/test/rss/rss-assertions.rb index 435f893e8d..cb757a9ae4 100644 --- a/test/rss/rss-assertions.rb +++ b/test/rss/rss-assertions.rb @@ -139,16 +139,16 @@ module RSS end end - def assert_xml_stylesheet_pis(attrs_ary) + def assert_xml_stylesheet_pis(attrs_ary, rss=nil) _wrap_assertion do - rdf = ::RSS::RDF.new() + rss ||= ::RSS::RDF.new() xss_strs = [] attrs_ary.each do |attrs| xss = ::RSS::XMLStyleSheet.new(*attrs) xss_strs.push(xss.to_s) - rdf.xml_stylesheets.push(xss) + rss.xml_stylesheets.push(xss) end - pi_str = rdf.to_s.gsub(/<\?xml .*\n/, "").gsub(/\s*