Sha256: 94012c0f73677edd9ccb7fd6589ce13e656ca49c816ce43d5b10adc3aa190cb8

Contents?: true

Size: 1.07 KB

Versions: 12

Compression:

Stored size: 1.07 KB

Contents

require "test/unit"
require "atom/feed"

# wiki page at <http://www.intertwingly.net/wiki/pie/UpdatedConformanceTests>
# test feed at <http://intertwingly.net/testcase/updated.atom>

class TestUpdatedConformance < Test::Unit::TestCase
  def test_it_all
    feed = Atom::Feed.new "http://intertwingly.net/testcase/updated.atom"

    assert_equal [], feed.entries

    # initial filling
    feed.update!
    assert_equal "12 of 13 miner survive mine collapse", feed.entries.first.content.to_s.strip
  
    # this is an insignificant change, 
    # (ie. atom:updated_1 == atom:updated_2),
    #
    # the update is applied, your application can handle that however it wants.
    feed.update!
    assert_equal "12 of 13 miner<b>s</b> survive mine collapse", feed.entries.first.content.to_s.strip
   
    # now we've got a significant change 
    feed.update!
    assert_equal "12 of 13 miners <del>survive</del> <b>killed</b> in mine collapse", feed.entries.first.content.to_s.strip
 
    # and now the feed is gone totally
    assert_raises(Atom::FeedGone) do
      feed.update!
    end
  end
end
 

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
thehack-atom-tools-2.0.3 test/conformance/updated.rb
atom-tools-2.0.5 test/conformance/updated.rb
atom-tools-2.0.4 test/conformance/updated.rb
atom-tools-0.9.4 test/conformance/updated.rb
atom-tools-1.0.0 test/conformance/updated.rb
atom-tools-0.9.3 test/conformance/updated.rb
atom-tools-0.9.2 test/conformance/updated.rb
atom-tools-0.9.1 test/conformance/updated.rb
atom-tools-2.0.1 test/conformance/updated.rb
atom-tools-2.0.2 test/conformance/updated.rb
atom-tools-2.0.3 test/conformance/updated.rb
atom-tools-2.0.0 test/conformance/updated.rb