aboutsummaryrefslogtreecommitdiffstats
path: root/test/rss/test_accessor.rb
blob: 1b92f9d98c8152d405f61f7e5cbf0d16f3d09b39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- tab-width: 2 -*- vim: ts=2

require "rss-testcase"

require "rss/1.0"
require "rss/2.0"

module RSS
  class TestAccessor < TestCase
    
    def test_date
      channel = Rss::Channel.new
      channel.do_validate = false
      channel.pubDate = nil
      assert_nil(channel.pubDate)
      
      time = Time.now
      channel.pubDate = time
      assert_equal(time, channel.pubDate)
      
      channel.pubDate = nil
      assert_nil(channel.pubDate)
    end
    
  end
end