Show
Ignore:
Timestamp:
12/01/07 09:35:57 (5 years ago)
Author:
coji
Message:

lang/ruby/ssb: add mock_csv, introduce new testing tool dust. http://dust.rubyforge.org/

Files:
1 moved

Legend:

Unmodified
Added
Removed
  • lang/ruby/ssb/trunk/test/ktai_spec_test.rb

    r1870 r2212  
    1 # test_ktai_spec.rb - Unit test for KtaiSpec 
    2 # 
    3 # Author:: MIZOGUCHI Coji <mizoguchi.coji at gmail.com> 
    4 # License:: Distributes under the same terms as Ruby 
    5 # 
    6 # $Id$ 
    7 # 
    8 require 'test/unit' 
    9 require 'config/common.rb' 
     1require File.expand_path(File.dirname(__FILE__) + '/test_helper') 
    102require 'ssb/ktai_spec.rb' 
    113 
    12 class KtaiSpec_Test < Test::Unit::TestCase 
     4unit_tests do 
    135  TEST_UA    = 'DoCoMo/2.0 N902i(c100;TB;hid;icc)' 
    146  TEST_PROPS = { 
     
    3426 
    3527  # デフォルトプロパティはキーとして存在する必要あり 
    36   def test_default_props 
     28  test 'default_props' do 
    3729    @spec.each do |spec| 
    3830      MUST_KEYS.each do |key| 
     
    4436 
    4537  # 拡張プロパティがちゃんと格納されるか 
    46   def test_extra_prop 
     38  test 'extra_prop' do 
    4739    assert(@spec[1].has_key?(:extra)) 
    4840    assert_equal(@spec[1][:extra], '拡張データ') 
     
    5042 
    5143  # ユーザエージェント文字列が正しいか 
    52   def test_useragent 
     44  test 'useragent' do 
    5345    assert(@spec[0][:useragent]) 
    5446    assert_equal(@spec[0][:useragent], TEST_UA)