mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rss/maker/*.rb: added RSS Maker.
* test/rss/test_maker_*.rb: added tests for RSS Maker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6cf2e24fe
commit
d58d59b0a4
21 changed files with 2673 additions and 3 deletions
|
@ -1,4 +1,3 @@
|
|||
# -*- tab-width: 2 -*- vim: ts=2
|
||||
module Test
|
||||
module Unit
|
||||
module Assertions
|
||||
|
@ -134,6 +133,30 @@ module RSS
|
|||
pi_str = rdf.to_s.gsub(/<\?xml .*\n/, "").gsub(/\s*<rdf:RDF.*\z/m, "")
|
||||
assert_equal(xss_strs.join("\n"), pi_str)
|
||||
end
|
||||
|
||||
def assert_dublin_core(elems, target)
|
||||
elems.each do |name, value|
|
||||
assert_equal(value, target.__send__("dc_#{name}"))
|
||||
end
|
||||
end
|
||||
|
||||
def assert_syndication(elems, target)
|
||||
elems.each do |name, value|
|
||||
assert_equal(value, target.__send__("sy_#{name}"))
|
||||
end
|
||||
end
|
||||
|
||||
def assert_content(elems, target)
|
||||
elems.each do |name, value|
|
||||
assert_equal(value, target.__send__("content_#{name}"))
|
||||
end
|
||||
end
|
||||
|
||||
def assert_trackback(elems, target)
|
||||
elems.each do |name, value|
|
||||
assert_equal(value, target.__send__("trackback_#{name}"))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue