Show
Ignore:
Timestamp:
12/01/07 03:48:42 (7 years ago)
Author:
lchin
Message:

/lang/ruby/ssb Using more appropriate assertions, tiny Rakefile fix.

Files:
1 modified

Legend:

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

    r1870 r2201  
    2727    # CGI Parameters 
    2828    ENV['SERVER_NAME'] = 'localhost' 
    29     ENV['SCRIPT_NAME'] = '/~coji/ssb/index.rbx' 
     29    ENV['SCRIPT_NAME'] = '/index.rbx' 
    3030    ENV['REQUEST_METHOD'] = method 
    3131    ENV['QUERY_STRING']   = query_string 
     
    5959  def test_ssb_get_local 
    6060    ret = kick_ssb('GET', "q=#{@mock_server.uri}&uid=NULLGWDOCOMO") 
    61     assert(ret =~ /It works by GET/) 
     61    assert_match(/It works by GET/, ret) 
    6262  end 
    6363 
     
    6565    # noname is invalid hostname 
    6666    ret = kick_ssb('GET', 'q=noname') 
    67     assert(ret =~ /getaddrinfo: nodename nor servname provided/) 
     67    assert_match(/getaddrinfo: nodename nor servname provided/, ret) 
    6868  end 
    6969 
    7070  def test_ssb_post_local 
    7171    ret = kick_ssb('POST', '', "q=#{@mock_server.uri}&param=test&uid=NULLGWDOCOMO") 
    72     assert(ret =~ /It works by POST/) 
     72    assert_match(/It works by POST/, ret) 
    7373  end 
    7474 
     
    7676    # noname is invalid hostname 
    7777    ret = kick_ssb('POST', '', 'q=noname&param=test&uid=NULLGWDOCOMO') 
    78     assert(ret =~ /getaddrinfo: nodename nor servname provided/) 
     78    assert_match(/getaddrinfo: nodename nor servname provided/, ret) 
    7979  end 
    8080end