diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:53:21 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 00:53:21 +0000 |
commit | 7461f297e92c2451b62a8797dff6562e52e3f746 (patch) | |
tree | 58ed280d46280b524dab8b8a6f6f739461f97589 /test/rss/rss-assertions.rb | |
parent | 88dd1e4c993e661b0d52c40d0eff567b00bf6ffd (diff) |
* lib/rss, test/rss: backported from trunk. (2005-11-16 - now)
* 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/branches/ruby_1_8@10296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/rss-assertions.rb')
-rw-r--r-- | test/rss/rss-assertions.rb | 8 |
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 |