mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d1c42e4f34
commit
f6327e732f
11 changed files with 91 additions and 75 deletions
|
@ -221,7 +221,7 @@ DELIMITER
|
||||||
<type>Book</type>
|
<type>Book</type>
|
||||||
<year>2000</year>
|
<year>2000</year>
|
||||||
</entry>"
|
</entry>"
|
||||||
desired_result_tree = Document.new desired_result_string
|
Document.new desired_result_string
|
||||||
xpath = "/biblio/entry[not(author)]"
|
xpath = "/biblio/entry[not(author)]"
|
||||||
result = XPath.first(doc, xpath)
|
result = XPath.first(doc, xpath)
|
||||||
assert_equal desired_result_string, result.to_s
|
assert_equal desired_result_string, result.to_s
|
||||||
|
@ -438,7 +438,7 @@ EOF
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_whitespace_after_xml_decl
|
def test_whitespace_after_xml_decl
|
||||||
d = Document.new <<EOL
|
Document.new <<EOL
|
||||||
<?xml version='1.0'?>
|
<?xml version='1.0'?>
|
||||||
<blo>
|
<blo>
|
||||||
<wak>
|
<wak>
|
||||||
|
@ -506,7 +506,7 @@ EOL
|
||||||
b << c
|
b << c
|
||||||
a << b
|
a << b
|
||||||
|
|
||||||
REXML::Formatters::Pretty.new.write(a,s="")
|
REXML::Formatters::Pretty.new.write(a,"")
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_pos
|
def test_pos
|
||||||
|
@ -523,7 +523,7 @@ EOL
|
||||||
testfile.puts testdata
|
testfile.puts testdata
|
||||||
testfile.rewind
|
testfile.rewind
|
||||||
assert_nothing_raised do
|
assert_nothing_raised do
|
||||||
d = REXML::Document.new(testfile)
|
REXML::Document.new(testfile)
|
||||||
end
|
end
|
||||||
testfile.close(true)
|
testfile.close(true)
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,6 +7,6 @@ class LightParserTester < Test::Unit::TestCase
|
||||||
def test_parsing
|
def test_parsing
|
||||||
f = File.new(fixture_path("documentation.xml"))
|
f = File.new(fixture_path("documentation.xml"))
|
||||||
parser = REXML::Parsers::LightParser.new( f )
|
parser = REXML::Parsers::LightParser.new( f )
|
||||||
root = parser.parse
|
parser.parse
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,7 +33,7 @@ class PullParserTester < Test::Unit::TestCase
|
||||||
source = "<a><b></a>"
|
source = "<a><b></a>"
|
||||||
parser = REXML::Parsers::PullParser.new(source)
|
parser = REXML::Parsers::PullParser.new(source)
|
||||||
assert_raise(ParseException, "Parsing should have failed") {
|
assert_raise(ParseException, "Parsing should have failed") {
|
||||||
results = parser.pull while parser.has_next?
|
parser.pull while parser.has_next?
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class PullParserTester < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_peek_unshift
|
def test_peek_unshift
|
||||||
source = "<a><b/></a>"
|
source = "<a><b/></a>"
|
||||||
pp = REXML::Parsers::PullParser.new(source)
|
REXML::Parsers::PullParser.new(source)
|
||||||
# FINISH ME!
|
# FINISH ME!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ class XPathTester < Test::Unit::TestCase
|
||||||
for line in File.new(xpathtests)
|
for line in File.new(xpathtests)
|
||||||
line.strip!
|
line.strip!
|
||||||
begin
|
begin
|
||||||
rt = doc.root
|
doc.root
|
||||||
#puts "#"*80
|
#puts "#"*80
|
||||||
#print "\nDoing #{line} " ; $stdout.flush
|
#print "\nDoing #{line} " ; $stdout.flush
|
||||||
doc.elements.each(line) do |el|
|
doc.elements.each(line) do |el|
|
||||||
|
@ -332,7 +332,7 @@ class XPathTester < Test::Unit::TestCase
|
||||||
</foo>
|
</foo>
|
||||||
EOF
|
EOF
|
||||||
doc = Document.new source
|
doc = Document.new source
|
||||||
result = XPath.each( doc, "//bar" ) {
|
XPath.each( doc, "//bar" ) {
|
||||||
fail "'bar' should match nothing in this case"
|
fail "'bar' should match nothing in this case"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,7 +523,7 @@ class XPathTester < Test::Unit::TestCase
|
||||||
# examples from http://www.w3.org/TR/xpath#function-substring
|
# examples from http://www.w3.org/TR/xpath#function-substring
|
||||||
doc = Document.new('<test string="12345" />')
|
doc = Document.new('<test string="12345" />')
|
||||||
|
|
||||||
d = Document.new("<a b='1'/>")
|
Document.new("<a b='1'/>")
|
||||||
#puts XPath.first(d, 'node()[0 + 1]')
|
#puts XPath.first(d, 'node()[0 + 1]')
|
||||||
#d = Document.new("<a b='1'/>")
|
#d = Document.new("<a b='1'/>")
|
||||||
#puts XPath.first(d, 'a[0 mod 0]')
|
#puts XPath.first(d, 'a[0 mod 0]')
|
||||||
|
@ -589,7 +589,7 @@ class XPathTester < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_name
|
def test_name
|
||||||
assert_raise( UndefinedNamespaceException, "x should be undefined" ) {
|
assert_raise( UndefinedNamespaceException, "x should be undefined" ) {
|
||||||
d = REXML::Document.new("<a x='foo'><b/><x:b/></a>")
|
REXML::Document.new("<a x='foo'><b/><x:b/></a>")
|
||||||
}
|
}
|
||||||
d = REXML::Document.new("<a xmlns:x='foo'><b/><x:b/></a>")
|
d = REXML::Document.new("<a xmlns:x='foo'><b/><x:b/></a>")
|
||||||
assert_equal 1, d.root.elements.to_a('*[name() = "b"]').size
|
assert_equal 1, d.root.elements.to_a('*[name() = "b"]').size
|
||||||
|
|
|
@ -14,7 +14,7 @@ class XpathTestCase < Test::Unit::TestCase
|
||||||
def test_text_as_element
|
def test_text_as_element
|
||||||
node1 = REXML::Element.new('a', @doc)
|
node1 = REXML::Element.new('a', @doc)
|
||||||
node2 = REXML::Element.new('b', node1)
|
node2 = REXML::Element.new('b', node1)
|
||||||
textnode = REXML::Text.new('test', false, node2)
|
REXML::Text.new('test', false, node2)
|
||||||
assert_equal(1, @doc.elements.size, "doc owns 1 element node1")
|
assert_equal(1, @doc.elements.size, "doc owns 1 element node1")
|
||||||
assert_same(node1, @doc.elements[1], "doc owns 1 element node1")
|
assert_same(node1, @doc.elements[1], "doc owns 1 element node1")
|
||||||
assert_equal(1, node1.elements.size, "node1 owns 1 element node2")
|
assert_equal(1, node1.elements.size, "node1 owns 1 element node2")
|
||||||
|
|
|
@ -972,7 +972,7 @@ EOA
|
||||||
feed_readers) do |maker|
|
feed_readers) do |maker|
|
||||||
yield maker
|
yield maker
|
||||||
targets = chain_reader(maker, maker_readers)
|
targets = chain_reader(maker, maker_readers)
|
||||||
target = targets.new_child
|
targets.new_child
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -186,7 +186,7 @@ EORSS
|
||||||
elems = ["<link>#{res}</link>"]
|
elems = ["<link>#{res}</link>"]
|
||||||
elems << "<title>title of #{res}</title>"
|
elems << "<title>title of #{res}</title>"
|
||||||
elems = elems.join("\n")
|
elems = elems.join("\n")
|
||||||
item = "<item>\n#{elems}\n</item>"
|
"<item>\n#{elems}\n</item>"
|
||||||
end.join("\n")
|
end.join("\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,6 @@ module RSS
|
||||||
|
|
||||||
def test_channel
|
def test_channel
|
||||||
about = "http://hoge.com"
|
about = "http://hoge.com"
|
||||||
title = "fugafuga"
|
|
||||||
link = "http://hoge.com"
|
|
||||||
description = "fugafugafugafuga"
|
|
||||||
resource = "http://hoge.com/hoge.png"
|
resource = "http://hoge.com/hoge.png"
|
||||||
|
|
||||||
item_title = "item title"
|
item_title = "item title"
|
||||||
|
@ -72,9 +69,18 @@ module RSS
|
||||||
rss_item.link = item_link
|
rss_item.link = item_link
|
||||||
rss_item.about = item_link
|
rss_item.about = item_link
|
||||||
|
|
||||||
|
h = {
|
||||||
|
'title' => "fugafuga",
|
||||||
|
'link' => "http://hoge.com",
|
||||||
|
'description' => "fugafugafugafuga",
|
||||||
|
'image' => image,
|
||||||
|
'items' => items,
|
||||||
|
'textinput' => textinput,
|
||||||
|
}
|
||||||
|
|
||||||
channel = RDF::Channel.new(about)
|
channel = RDF::Channel.new(about)
|
||||||
%w(title link description image items textinput).each do |x|
|
%w(title link description image items textinput).each do |x|
|
||||||
channel.__send__("#{x}=", instance_eval(x))
|
channel.__send__("#{x}=", h[x])
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = REXML::Document.new(make_RDF(<<-EOR))
|
doc = REXML::Document.new(make_RDF(<<-EOR))
|
||||||
|
@ -96,7 +102,7 @@ EOR
|
||||||
assert_equal(@rdf_uri, res.namespace)
|
assert_equal(@rdf_uri, res.namespace)
|
||||||
value = res.value
|
value = res.value
|
||||||
else
|
else
|
||||||
excepted = instance_eval(x)
|
excepted = h[x]
|
||||||
value = elem.text
|
value = elem.text
|
||||||
end
|
end
|
||||||
assert_equal(excepted, value)
|
assert_equal(excepted, value)
|
||||||
|
@ -199,13 +205,15 @@ EOR
|
||||||
|
|
||||||
def test_image
|
def test_image
|
||||||
about = "http://hoge.com"
|
about = "http://hoge.com"
|
||||||
title = "fugafuga"
|
h = {
|
||||||
url = "http://hoge.com/hoge"
|
'title' => "fugafuga",
|
||||||
link = "http://hoge.com/fuga"
|
'url' => "http://hoge.com/hoge",
|
||||||
|
'link' => "http://hoge.com/fuga",
|
||||||
|
}
|
||||||
|
|
||||||
image = RDF::Image.new(about)
|
image = RDF::Image.new(about)
|
||||||
%w(title url link).each do |x|
|
%w(title url link).each do |x|
|
||||||
image.__send__("#{x}=", instance_eval(x))
|
image.__send__("#{x}=", h[x])
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = REXML::Document.new(make_RDF(image.to_s))
|
doc = REXML::Document.new(make_RDF(image.to_s))
|
||||||
|
@ -216,19 +224,21 @@ EOR
|
||||||
elem = i.elements[x]
|
elem = i.elements[x]
|
||||||
assert_equal(x, elem.name)
|
assert_equal(x, elem.name)
|
||||||
assert_equal(@uri, elem.namespace)
|
assert_equal(@uri, elem.namespace)
|
||||||
assert_equal(instance_eval(x), elem.text)
|
assert_equal(h[x], elem.text)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_item
|
def test_item
|
||||||
about = "http://hoge.com"
|
about = "http://hoge.com"
|
||||||
title = "fugafuga"
|
h = {
|
||||||
link = "http://hoge.com/fuga"
|
'title' => "fugafuga",
|
||||||
description = "hogehogehoge"
|
'link' => "http://hoge.com/fuga",
|
||||||
|
'description' => "hogehogehoge",
|
||||||
|
}
|
||||||
|
|
||||||
item = RDF::Item.new(about)
|
item = RDF::Item.new(about)
|
||||||
%w(title link description).each do |x|
|
%w(title link description).each do |x|
|
||||||
item.__send__("#{x}=", instance_eval(x))
|
item.__send__("#{x}=", h[x])
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = REXML::Document.new(make_RDF(item.to_s))
|
doc = REXML::Document.new(make_RDF(item.to_s))
|
||||||
|
@ -239,20 +249,22 @@ EOR
|
||||||
elem = i.elements[x]
|
elem = i.elements[x]
|
||||||
assert_equal(x, elem.name)
|
assert_equal(x, elem.name)
|
||||||
assert_equal(@uri, elem.namespace)
|
assert_equal(@uri, elem.namespace)
|
||||||
assert_equal(instance_eval(x), elem.text)
|
assert_equal(h[x], elem.text)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_textinput
|
def test_textinput
|
||||||
about = "http://hoge.com"
|
about = "http://hoge.com"
|
||||||
title = "fugafuga"
|
h = {
|
||||||
link = "http://hoge.com/fuga"
|
'title' => "fugafuga",
|
||||||
name = "foo"
|
'link' => "http://hoge.com/fuga",
|
||||||
description = "hogehogehoge"
|
'name' => "foo",
|
||||||
|
'description' => "hogehogehoge",
|
||||||
|
}
|
||||||
|
|
||||||
textinput = RDF::Textinput.new(about)
|
textinput = RDF::Textinput.new(about)
|
||||||
%w(title link name description).each do |x|
|
%w(title link name description).each do |x|
|
||||||
textinput.__send__("#{x}=", instance_eval(x))
|
textinput.__send__("#{x}=", h[x])
|
||||||
end
|
end
|
||||||
|
|
||||||
doc = REXML::Document.new(make_RDF(textinput.to_s))
|
doc = REXML::Document.new(make_RDF(textinput.to_s))
|
||||||
|
@ -263,7 +275,7 @@ EOR
|
||||||
elem = t.elements[x]
|
elem = t.elements[x]
|
||||||
assert_equal(x, elem.name)
|
assert_equal(x, elem.name)
|
||||||
assert_equal(@uri, elem.namespace)
|
assert_equal(@uri, elem.namespace)
|
||||||
assert_equal(instance_eval(x), elem.text)
|
assert_equal(h[x], elem.text)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -53,16 +53,22 @@ module RSS
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_channel
|
def test_channel
|
||||||
title = "fugafuga"
|
h = {
|
||||||
link = "http://hoge.com"
|
'title' => "fugafuga",
|
||||||
description = "fugafugafugafuga"
|
'link' => "http://hoge.com",
|
||||||
|
'description' => "fugafugafugafuga",
|
||||||
|
|
||||||
language = "en-us"
|
'language' => "en-us",
|
||||||
copyright = "Copyright 2002, Spartanburg Herald-Journal"
|
'copyright' => "Copyright 2002, Spartanburg Herald-Journal",
|
||||||
managingEditor = "geo@herald.com (George Matesky)"
|
'managingEditor' => "geo@herald.com (George Matesky)",
|
||||||
webMaster = "betty@herald.com (Betty Guernsey)"
|
'webMaster' => "betty@herald.com (Betty Guernsey)",
|
||||||
pubDate = Time.parse("Sat, 07 Sep 2002 00:00:01 GMT")
|
'pubDate' => Time.parse("Sat, 07 Sep 2002 00:00:01 GMT"),
|
||||||
lastBuildDate = Time.parse("Sat, 07 Sep 2002 09:42:31 GMT")
|
'lastBuildDate' => Time.parse("Sat, 07 Sep 2002 09:42:31 GMT"),
|
||||||
|
'generator' => "MightyInHouse Content System v2.3",
|
||||||
|
'docs' => "http://blogs.law.harvard.edu/tech/rss",
|
||||||
|
'ttl' => "60",
|
||||||
|
'rating' => '(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" for "http://www.rsac.org" on "1996.04.16T08:15-0500" r (n 0 s 0 v 0 l 0))',
|
||||||
|
}
|
||||||
categories = [
|
categories = [
|
||||||
{
|
{
|
||||||
:content => "Newspapers",
|
:content => "Newspapers",
|
||||||
|
@ -72,12 +78,6 @@ module RSS
|
||||||
:content => "1765",
|
:content => "1765",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
generator = "MightyInHouse Content System v2.3"
|
|
||||||
docs = "http://blogs.law.harvard.edu/tech/rss"
|
|
||||||
|
|
||||||
ttl = "60"
|
|
||||||
|
|
||||||
rating = '(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l gen true comment "RSACi North America Server" for "http://www.rsac.org" on "1996.04.16T08:15-0500" r (n 0 s 0 v 0 l 0))'
|
|
||||||
|
|
||||||
channel = Rss::Channel.new
|
channel = Rss::Channel.new
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ module RSS
|
||||||
managingEditor webMaster pubDate lastBuildDate
|
managingEditor webMaster pubDate lastBuildDate
|
||||||
generator docs ttl rating)
|
generator docs ttl rating)
|
||||||
elems.each do |x|
|
elems.each do |x|
|
||||||
value = instance_eval(x)
|
value = h[x]
|
||||||
value = value.rfc822 if %w(pubDate lastBuildDate).include?(x)
|
value = value.rfc822 if %w(pubDate lastBuildDate).include?(x)
|
||||||
channel.__send__("#{x}=", value)
|
channel.__send__("#{x}=", value)
|
||||||
end
|
end
|
||||||
|
@ -101,7 +101,7 @@ module RSS
|
||||||
elem = c.elements[x]
|
elem = c.elements[x]
|
||||||
assert_equal(x, elem.name)
|
assert_equal(x, elem.name)
|
||||||
assert_equal("", elem.namespace)
|
assert_equal("", elem.namespace)
|
||||||
expected = instance_eval(x)
|
expected = h[x]
|
||||||
case x
|
case x
|
||||||
when "pubDate", "lastBuildDate"
|
when "pubDate", "lastBuildDate"
|
||||||
assert_equal(expected, Time.parse(elem.text))
|
assert_equal(expected, Time.parse(elem.text))
|
||||||
|
@ -236,10 +236,14 @@ module RSS
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_item
|
def test_item
|
||||||
title = "fugafuga"
|
h = {
|
||||||
link = "http://hoge.com/"
|
'title' => "fugafuga",
|
||||||
description = "text hoge fuga"
|
'link' => "http://hoge.com/",
|
||||||
author = "oprah@oxygen.net"
|
'description' => "text hoge fuga",
|
||||||
|
'author' => "oprah@oxygen.net",
|
||||||
|
'comments' => "http://www.myblog.org/cgi-local/mt/mt-comments.cgi?entry_id=290",
|
||||||
|
'pubDate' => Time.parse("Sat, 07 Sep 2002 00:00:01 GMT"),
|
||||||
|
}
|
||||||
categories = [
|
categories = [
|
||||||
{
|
{
|
||||||
:content => "Newspapers",
|
:content => "Newspapers",
|
||||||
|
@ -249,8 +253,6 @@ module RSS
|
||||||
:content => "1765",
|
:content => "1765",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
comments = "http://www.myblog.org/cgi-local/mt/mt-comments.cgi?entry_id=290"
|
|
||||||
pubDate = Time.parse("Sat, 07 Sep 2002 00:00:01 GMT")
|
|
||||||
|
|
||||||
channel = Rss::Channel.new
|
channel = Rss::Channel.new
|
||||||
channel.title = "title"
|
channel.title = "title"
|
||||||
|
@ -262,7 +264,7 @@ module RSS
|
||||||
|
|
||||||
elems = %w(title link description author comments pubDate)
|
elems = %w(title link description author comments pubDate)
|
||||||
elems.each do |x|
|
elems.each do |x|
|
||||||
value = instance_eval(x)
|
value = h[x]
|
||||||
value = value.rfc822 if x == "pubDate"
|
value = value.rfc822 if x == "pubDate"
|
||||||
item.__send__("#{x}=", value)
|
item.__send__("#{x}=", value)
|
||||||
end
|
end
|
||||||
|
@ -279,7 +281,7 @@ module RSS
|
||||||
elem = item_elem.elements[x]
|
elem = item_elem.elements[x]
|
||||||
assert_equal(x, elem.name)
|
assert_equal(x, elem.name)
|
||||||
assert_equal("", elem.namespace)
|
assert_equal("", elem.namespace)
|
||||||
expected = instance_eval(x)
|
expected = h[x]
|
||||||
case x
|
case x
|
||||||
when "pubDate"
|
when "pubDate"
|
||||||
assert_equal(expected, Time.parse(elem.text))
|
assert_equal(expected, Time.parse(elem.text))
|
||||||
|
|
|
@ -453,11 +453,13 @@ module RSS
|
||||||
def assert_atom_link_to_s(target_class)
|
def assert_atom_link_to_s(target_class)
|
||||||
_wrap_assertion do
|
_wrap_assertion do
|
||||||
href = "http://example.com/atom.xml"
|
href = "http://example.com/atom.xml"
|
||||||
rel = "self"
|
optvs = {
|
||||||
type = "application/atom+xml"
|
'rel' => "self",
|
||||||
hreflang = "ja"
|
'type' => "application/atom+xml",
|
||||||
title = "Atom Feed"
|
'hreflang' => "ja",
|
||||||
length = "801"
|
'title' => "Atom Feed",
|
||||||
|
'length' => "801",
|
||||||
|
}
|
||||||
|
|
||||||
link = target_class.new
|
link = target_class.new
|
||||||
assert_equal("", link.to_s)
|
assert_equal("", link.to_s)
|
||||||
|
@ -472,24 +474,24 @@ module RSS
|
||||||
rest = optional_arguments.reject {|x| x == name}
|
rest = optional_arguments.reject {|x| x == name}
|
||||||
|
|
||||||
link = target_class.new
|
link = target_class.new
|
||||||
link.__send__("#{name}=", eval(name))
|
link.__send__("#{name}=", optvs[name])
|
||||||
assert_equal("", link.to_s)
|
assert_equal("", link.to_s)
|
||||||
|
|
||||||
rest.each do |n|
|
rest.each do |n|
|
||||||
link.__send__("#{n}=", eval(n))
|
link.__send__("#{n}=", optvs[n])
|
||||||
assert_equal("", link.to_s)
|
assert_equal("", link.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
link = target_class.new
|
link = target_class.new
|
||||||
link.href = href
|
link.href = href
|
||||||
link.__send__("#{name}=", eval(name))
|
link.__send__("#{name}=", optvs[name])
|
||||||
attrs = [["href", href], [name, eval(name)]]
|
attrs = [["href", href], [name, optvs[name]]]
|
||||||
xml = REXML::Document.new(link.to_s).root
|
xml = REXML::Document.new(link.to_s).root
|
||||||
assert_rexml_element([], attrs, nil, xml)
|
assert_rexml_element([], attrs, nil, xml)
|
||||||
|
|
||||||
rest.each do |n|
|
rest.each do |n|
|
||||||
link.__send__("#{n}=", eval(n))
|
link.__send__("#{n}=", optvs[n])
|
||||||
attrs << [n, eval(n)]
|
attrs << [n, optvs[n]]
|
||||||
xml = REXML::Document.new(link.to_s).root
|
xml = REXML::Document.new(link.to_s).root
|
||||||
assert_rexml_element([], attrs, nil, xml)
|
assert_rexml_element([], attrs, nil, xml)
|
||||||
end
|
end
|
||||||
|
|
|
@ -445,7 +445,7 @@ module RSS
|
||||||
def test_pubDate_without_description
|
def test_pubDate_without_description
|
||||||
title = "TITLE"
|
title = "TITLE"
|
||||||
link = "http://hoge.com/"
|
link = "http://hoge.com/"
|
||||||
description = "text hoge fuga"
|
# description = "text hoge fuga"
|
||||||
author = "oprah@oxygen.net"
|
author = "oprah@oxygen.net"
|
||||||
pubDate = Time.now
|
pubDate = Time.now
|
||||||
|
|
||||||
|
@ -529,13 +529,13 @@ module RSS
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_not_valid_guid
|
def test_not_valid_guid
|
||||||
content = "http://inessential.com/2002/09/01.php#a2"
|
# content = "http://inessential.com/2002/09/01.php#a2"
|
||||||
|
|
||||||
rss = RSS::Maker.make("2.0") do |maker|
|
rss = RSS::Maker.make("2.0") do |maker|
|
||||||
setup_dummy_channel(maker)
|
setup_dummy_channel(maker)
|
||||||
setup_dummy_item(maker)
|
setup_dummy_item(maker)
|
||||||
|
|
||||||
guid = maker.items.last.guid
|
# guid = maker.items.last.guid
|
||||||
# guid.content = content
|
# guid.content = content
|
||||||
end
|
end
|
||||||
assert_nil(rss.channel.items.last.guid)
|
assert_nil(rss.channel.items.last.guid)
|
||||||
|
@ -662,7 +662,7 @@ module RSS
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_not_valid_category
|
def test_not_valid_category
|
||||||
content = "Grateful Dead"
|
# content = "Grateful Dead"
|
||||||
|
|
||||||
rss = RSS::Maker.make("2.0") do |maker|
|
rss = RSS::Maker.make("2.0") do |maker|
|
||||||
setup_dummy_channel(maker)
|
setup_dummy_channel(maker)
|
||||||
|
|
Loading…
Reference in a new issue