diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-13 14:21:21 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-13 14:21:21 +0000 |
commit | 8d420b86883e16d966de178534a0082a1c821704 (patch) | |
tree | 25c068b4a748034ce329db7fc777e706fb703962 /test | |
parent | 283fbc5ba3485292eb500efb77b4498b8c9aaa01 (diff) | |
download | ruby-8d420b86883e16d966de178534a0082a1c821704.tar.gz ruby-8d420b86883e16d966de178534a0082a1c821704.tar.xz ruby-8d420b86883e16d966de178534a0082a1c821704.zip |
* lib/rss/dublincore.rb (RSS::DublicCoreModel#date{,=}): added
convenient methods.
* lib/rss/0.9.rb (RSS::Rss::Channel#date{,=}): ditto.
* lib/rss/2.0.rb (RSS::Rss::Channel::Item#date{,=}): ditto.
* test/rss/: added tests for the convenient methods.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/rss/test_dublincore.rb | 5 | ||||
-rw-r--r-- | test/rss/test_maker_0.9.rb | 1 | ||||
-rw-r--r-- | test/rss/test_maker_2.0.rb | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/test/rss/test_dublincore.rb b/test/rss/test_dublincore.rb index d95d31f24..e1ee929af 100644 --- a/test/rss/test_dublincore.rb +++ b/test/rss/test_dublincore.rb @@ -90,6 +90,11 @@ EOR end @rss.send(parent).send("dc_#{name}=", t.iso8601) assert_equal(t, @rss.send(parent).send("dc_#{name}")) + assert_equal(t, @rss.send(parent).date) + + @rss.send(parent).date = value + assert_equal(value, @rss.send(parent).date) + assert_equal(value, @rss.send(parent).send("dc_#{name}")) else @rss.send(parent).send("dc_#{name}=", new_value) assert_equal(new_value, @rss.send(parent).send("dc_#{name}")) diff --git a/test/rss/test_maker_0.9.rb b/test/rss/test_maker_0.9.rb index 50c311ad9..8fdd5f2d6 100644 --- a/test/rss/test_maker_0.9.rb +++ b/test/rss/test_maker_0.9.rb @@ -102,6 +102,7 @@ module RSS assert_equal(rating, channel.rating) assert_equal(docs, channel.docs) assert_equal(pubDate, channel.pubDate) + assert_equal(pubDate, channel.date) assert_equal(lastBuildDate, channel.lastBuildDate) skipDays.each_with_index do |day, i| diff --git a/test/rss/test_maker_2.0.rb b/test/rss/test_maker_2.0.rb index e2d5e3228..b4d402a83 100644 --- a/test/rss/test_maker_2.0.rb +++ b/test/rss/test_maker_2.0.rb @@ -110,6 +110,7 @@ module RSS assert_equal(rating, channel.rating) assert_equal(docs, channel.docs) assert_equal(pubDate, channel.pubDate) + assert_equal(pubDate, channel.date) assert_equal(lastBuildDate, channel.lastBuildDate) skipDays.each_with_index do |day, i| @@ -385,6 +386,7 @@ module RSS assert_equal("#{author}#{i}", item.author) assert_equal("#{comments}#{i}", item.comments) assert_equal(pubDate, item.pubDate) + assert_equal(pubDate, item.date) end rss = RSS::Maker.make("2.0") do |maker| @@ -411,6 +413,7 @@ module RSS assert_equal("#{author}#{i}", item.author) assert_equal("#{comments}#{i}", item.comments) assert_equal(pubDate, item.pubDate) + assert_equal(pubDate, item.date) end end |