summaryrefslogtreecommitdiff
path: root/test/cgi
diff options
context:
space:
mode:
authorxibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 06:25:44 +0000
committerxibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 06:25:44 +0000
commit2798319088712b115243eaa81f420e76eb23c5af (patch)
tree3e166c0294b1a72720faaa539ce344cb960cdc0f /test/cgi
parentcdc5ebd3f2347d04785840c4903ad3d93631cf90 (diff)
* test/cgi/test_cgi_multipart.rb : test for miniunit.
* test/cgi/test_cgi_core.rb : ditto. * test/cgi/test_cgi_header.rb : ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi')
-rwxr-xr-xtest/cgi/test_cgi_core.rb6
-rwxr-xr-xtest/cgi/test_cgi_header.rb2
-rwxr-xr-xtest/cgi/test_cgi_multipart.rb8
3 files changed, 8 insertions, 8 deletions
diff --git a/test/cgi/test_cgi_core.rb b/test/cgi/test_cgi_core.rb
index 36a3c3003c9..6f420199d3f 100755
--- a/test/cgi/test_cgi_core.rb
+++ b/test/cgi/test_cgi_core.rb
@@ -110,7 +110,7 @@ class CGICoreTest < Test::Unit::TestCase
}
ENV.update(@environ)
cgi = CGI.new
- assert_not_nil(cgi.cookies)
+ refute_nil(cgi.cookies)
[ ['_session_id', ['12345'], ],
['name1', ['val1', 'val2'], ],
].each do |key, expected|
@@ -131,7 +131,7 @@ class CGICoreTest < Test::Unit::TestCase
'CONTENT_LENGTH' => (64 * 1024 * 1024).to_s
}
ENV.update(@environ)
- ex = assert_raise(StandardError) do
+ ex = assert_raises(StandardError) do
cgi = CGI.new
end
assert_equal("too large post data.", ex.message)
@@ -285,7 +285,7 @@ class CGICoreTest < Test::Unit::TestCase
ENV.update(@environ)
## no htmltype
cgi = CGI.new
- assert_raise(NoMethodError) do cgi.doctype end
+ assert_raises(NoMethodError) do cgi.doctype end
## html3
cgi = CGI.new('html3')
expected = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">'
diff --git a/test/cgi/test_cgi_header.rb b/test/cgi/test_cgi_header.rb
index 58f82ba3bc5..7c131f867c9 100755
--- a/test/cgi/test_cgi_header.rb
+++ b/test/cgi/test_cgi_header.rb
@@ -76,7 +76,7 @@ class CGIHeaderTest < Test::Unit::TestCase
else
expected = NoMethodError # for Ruby1.8
end
- ex = assert_raise(expected) do
+ ex = assert_raises(expected) do
cgi.header(nil)
end
end
diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb
index 18eb741d77a..c4ec833f847 100755
--- a/test/cgi/test_cgi_multipart.rb
+++ b/test/cgi/test_cgi_multipart.rb
@@ -213,7 +213,7 @@ class CGIMultipartTest < Test::Unit::TestCase
]
original = _set_const(CGI, :MAX_MULTIPART_LENGTH, 2 * 1024)
begin
- ex = assert_raise(StandardError) do
+ ex = assert_raises(StandardError) do
_test_multipart()
end
assert_equal("too large multipart data.", ex.message)
@@ -232,7 +232,7 @@ class CGIMultipartTest < Test::Unit::TestCase
500.times { @data << item }
#original = _set_const(CGI, :MAX_MULTIPART_COUNT, 128)
begin
- ex = assert_raise(StandardError) do
+ ex = assert_raises(StandardError) do
_test_multipart()
end
assert_equal("too many parameters.", ex.message)
@@ -253,7 +253,7 @@ class CGIMultipartTest < Test::Unit::TestCase
#p input2
input2
end
- ex = assert_raise(EOFError) do
+ ex = assert_raises(EOFError) do
cgi = CGI.new
end
assert_equal("bad boundary end of body part", ex.message)
@@ -264,7 +264,7 @@ class CGIMultipartTest < Test::Unit::TestCase
#p input2
input2
end
- ex = assert_raise(EOFError) do
+ ex = assert_raises(EOFError) do
cgi = CGI.new
end
assert_equal("bad content body", ex.message)