summaryrefslogtreecommitdiff
path: root/test/rss/rss-assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rss/rss-assertions.rb')
-rw-r--r--test/rss/rss-assertions.rb8
1 files changed, 4 insertions, 4 deletions
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*<rdf:RDF.*\z/m, "")
+ pi_str = rss.to_s.gsub(/<\?xml .*\n/, "").gsub(/\s*<[^\?].*\z/m, "")
assert_equal(xss_strs.join("\n"), pi_str)
end
end