Changeset 5070 for platform/tdiary/test
- Timestamp:
- 01/20/08 17:00:13 (10 months ago)
- Files:
-
- 1 modified
-
platform/tdiary/test/my_hotentry_test.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
platform/tdiary/test/my_hotentry_test.rb
r3281 r5070 11 11 class MyHotEntryTest < Test::Unit::TestCase 12 12 def setup 13 # @cache_path �ϡ֥ե�����-�ץ�����13 # @cache_path は「ファイル名-プロセス番号」 14 14 @cache_path = File.join(Dir.tmpdir, "#{__FILE__}-#{$$}") 15 15 Dir.mkdir(@cache_path) … … 22 22 23 23 def test_update 24 # �͵���������� base_url = 'http://d.hatena.ne.jp/' 24 # 人気の日記一覧を取得する 25 base_url = 'http://d.hatena.ne.jp/' 25 26 hotentry = MyHotEntry.new(@dbfile) 26 27 hotentry.update(base_url) 27 # �������������뤬���������뤳�� assert(File.file?(@dbfile)) 28 # �͵������Ǥ��Ƥ��뤳�� entries = hotentry.entries 28 # キャッシュファイルが生成されていること 29 assert(File.file?(@dbfile)) 30 # 人気の日記が取得できていること 31 entries = hotentry.entries 29 32 assert(entries.size > 0) 30 33 entries.each do |entry| 31 assert(entry[:url].include?(base_url), 'base_url �ǻ�ꤷ��URL���ޤޤ����뤳��)34 assert(entry[:url].include?(base_url), 'base_url で指定したURLが含まれていること') 32 35 assert(entry[:title].size > 0) 33 36 end 34 37 end 35 38 36 # ���������Ƥ⥭�����奵������������ʤ������� def test_double_update 39 # 何度も取得してもキャッシュサイズが大きくならないこと 40 def test_double_update 37 41 base_url = 'http://d.hatena.ne.jp/' 38 42 hotentry = MyHotEntry.new(@dbfile) … … 46 50 end 47 51 48 # ����������ϥ����������ꥢ���ʤ�52 # 取得結果が空の場合はキャッシュをクリアしない 49 53 def test_update_noentry 50 54 exist_url = 'http://d.hatena.ne.jp/'
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)