summaryrefslogtreecommitdiff
path: root/test/rss/test_maker_taxo.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 01:28:46 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 01:28:46 +0000
commit02cce7ed8273bab55081357c57f24a8265a6f32a (patch)
tree81fcc7a474ce90e19acf57390e5b5795849de6c0 /test/rss/test_maker_taxo.rb
parent463c6a218fed7248531a002806e9b07be7f5a6ea (diff)
* lib/rss/rss.rb (Kernel#funcall): removed.
* lib/rss/parser.rb (Kernel.URI): removed. * lib/rss/maker/: supported xxx.new_yyy do |yyy| yyy.zzz = zzz ... end style and this style became the style of the recommendation. Old style yyy = xxx.new_yyy yyy.zzz = zzz ... is supported too but this style isn't recommended. [ruby-talk:197284] * test/rss/test_*maker*.rb: used new recommended style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rss/test_maker_taxo.rb')
-rw-r--r--test/rss/test_maker_taxo.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/rss/test_maker_taxo.rb b/test/rss/test_maker_taxo.rb
index 1c7d2844ce..8feb4e1d33 100644
--- a/test/rss/test_maker_taxo.rb
+++ b/test/rss/test_maker_taxo.rb
@@ -56,14 +56,16 @@ module RSS
rss = RSS::Maker.make("1.0") do |maker|
setup_dummy_channel(maker)
maker.channel.date = t1
- date = maker.channel.dc_dates.new_date
- date.value = t2
+ maker.channel.dc_dates.new_date do |date|
+ date.value = t2
+ end
setup_dummy_item(maker)
item = maker.items.last
item.date = t2
- date = item.dc_dates.new_date
- date.value = t1
+ item.dc_dates.new_date do |date|
+ date.value = t1
+ end
end
assert_equal([t1, t2], rss.channel.dc_dates.collect{|x| x.value})
assert_equal([t2, t1], rss.items.last.dc_dates.collect{|x| x.value})