aboutsummaryrefslogtreecommitdiffstats
path: root/test/rss/test_atom.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-23 21:37:39 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-23 21:37:39 +0000
commitf6327e732fbc8c68dae163401d283924769dee8d (patch)
tree47f2922c8db27b572148164f8de904fa569bd7de /test/rss/test_atom.rb
parentd1c42e4f341e063d3849a3a9e3622b7261735559 (diff)
downloadruby-f6327e732fbc8c68dae163401d283924769dee8d.tar.gz
Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_atom.rb')
-rw-r--r--test/rss/test_atom.rb24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/rss/test_atom.rb b/test/rss/test_atom.rb
index 80da69bd94..e0ae108698 100644
--- a/test/rss/test_atom.rb
+++ b/test/rss/test_atom.rb
@@ -453,11 +453,13 @@ module RSS
def assert_atom_link_to_s(target_class)
_wrap_assertion do
href = "http://example.com/atom.xml"
- rel = "self"
- type = "application/atom+xml"
- hreflang = "ja"
- title = "Atom Feed"
- length = "801"
+ optvs = {
+ 'rel' => "self",
+ 'type' => "application/atom+xml",
+ 'hreflang' => "ja",
+ 'title' => "Atom Feed",
+ 'length' => "801",
+ }
link = target_class.new
assert_equal("", link.to_s)
@@ -472,24 +474,24 @@ module RSS
rest = optional_arguments.reject {|x| x == name}
link = target_class.new
- link.__send__("#{name}=", eval(name))
+ link.__send__("#{name}=", optvs[name])
assert_equal("", link.to_s)
rest.each do |n|
- link.__send__("#{n}=", eval(n))
+ link.__send__("#{n}=", optvs[n])
assert_equal("", link.to_s)
end
link = target_class.new
link.href = href
- link.__send__("#{name}=", eval(name))
- attrs = [["href", href], [name, eval(name)]]
+ link.__send__("#{name}=", optvs[name])
+ attrs = [["href", href], [name, optvs[name]]]
xml = REXML::Document.new(link.to_s).root
assert_rexml_element([], attrs, nil, xml)
rest.each do |n|
- link.__send__("#{n}=", eval(n))
- attrs << [n, eval(n)]
+ link.__send__("#{n}=", optvs[n])
+ attrs << [n, optvs[n]]
xml = REXML::Document.new(link.to_s).root
assert_rexml_element([], attrs, nil, xml)
end