summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-02-18 05:52:35 +0000
committerSteve Kemp <steve@steve.org.uk>2015-02-18 05:52:35 +0000
commit50a2fd6c8949894e5e6207cb616f6d40a0afa944 (patch)
treebf4cbe113f0101ac7f72b735719bb1f3c07a0e69
parent09a3905e93f0a0720c3e33ed539295582de61fcc (diff)
Minor test-case update.
Now we have multiple HTTP-implementations we need to update to make sure they're all caught.
-rwxr-xr-xt/test-custodian-parser.rb33
1 files changed, 21 insertions, 12 deletions
diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb
index e7b0bb5..bd6a933 100755
--- a/t/test-custodian-parser.rb
+++ b/t/test-custodian-parser.rb
@@ -299,13 +299,16 @@ EOF
# Create the new parser
#
obj = Custodian::TestFactory.create( str )
- assert(obj, "Instantiating a test works")
- assert( str == obj.to_s, "Getting back the test works" )
+
+ assert( !obj.nil? )
+ assert( obj.kind_of? Array )
+ assert( obj.size == 1 )
+ assert_equal( obj[0].to_s, str )
if ( follow )
- assert( obj.follow_redirects? )
+ assert( obj[0].follow_redirects? )
else
- assert( ! obj.follow_redirects? )
+ assert( ! obj[0].follow_redirects? )
end
end
end
@@ -335,13 +338,16 @@ EOF
# Create the new parser
#
obj = Custodian::TestFactory.create( str )
- assert(obj, "Instantiating a test works")
- assert( str == obj.to_s, "Getting back the test works" )
+
+ assert( !obj.nil? )
+ assert( obj.kind_of? Array )
+ assert( obj.size == 1 )
+ assert_equal( obj[0].to_s, str )
if ( cb )
- assert( obj.cache_busting? )
+ assert( obj[0].cache_busting? )
else
- assert( ! obj.cache_busting? )
+ assert( ! obj[0].cache_busting? )
end
end
end
@@ -378,13 +384,16 @@ EOF
# Create the new parser
#
obj = Custodian::TestFactory.create( str )
- assert(obj, "Instantiating a test works")
- assert( str == obj.to_s, "Getting back the test works" )
+
+ assert( !obj.nil? )
+ assert( obj.kind_of? Array )
+ assert( obj.size == 1 )
+ assert_equal( obj[0].to_s, str )
if ( fail.nil? )
- assert( obj.get_notification_text().nil? )
+ assert( obj[0].get_notification_text().nil? )
else
- assert_equal( obj.get_notification_text(), fail )
+ assert_equal( obj[0].get_notification_text(), fail )
end
end