summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
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