~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to test/rss/test_maker_2.0.rb

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
      assert_nil(rss.image)
354
354
    end
355
355
    
356
 
    def test_items
 
356
    def test_items(with_convenience_way=true)
357
357
      title = "TITLE"
358
358
      link = "http://hoge.com/"
359
359
      description = "text hoge fuga"
407
407
          end
408
408
        end
409
409
        maker.items.do_sort = Proc.new do |x, y|
410
 
          y.title.content[-1] <=> x.title.content[-1]
 
410
          if with_convenience_way
 
411
            y.title[-1] <=> x.title[-1]
 
412
          else
 
413
            y.title {|t| t.content[-1]} <=> x.title {|t| t.content[-1]}
 
414
          end
411
415
        end
412
416
      end
413
417
      assert_equal(item_size, rss.items.size)
422
426
      end
423
427
    end
424
428
 
 
429
    def test_items_with_new_api_since_018
 
430
      test_items(false)
 
431
    end
 
432
 
425
433
    def test_guid
426
434
      isPermaLink = "true"
427
435
      content = "http://inessential.com/2002/09/01.php#a2"