summaryrefslogtreecommitdiff
path: root/t
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
commit1665312661bc789edec360dc9bbdac990b3c2abf (patch)
treedd9f003f8e1bcab8532432bf5323ffc0b42a3a61 /t
parentfa510022166d9e8a04325858c256f56c0ac91c52 (diff)
Minor test-case update.
Now we have multiple HTTP-implementations we need to update to make sure they're all caught.
Diffstat (limited to 't')
-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