summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-01-14 10:26:54 +0000
committerSteve Kemp <steve@steve.org.uk>2013-01-14 10:26:54 +0000
commit69a2e1ecbb08f3d1bf6fa779caa94e41f126a589 (patch)
tree2672a438e497f34af32ff745ef4380d598bc81de
parentb011042e3b16caa507aa909f0abad94b7ed6f9e6 (diff)
Test we get an error on non-strings.
-rwxr-xr-xt/test-custodian-parser.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/test-custodian-parser.rb b/t/test-custodian-parser.rb
index 1448a1d..1a5be6e 100755
--- a/t/test-custodian-parser.rb
+++ b/t/test-custodian-parser.rb
@@ -68,7 +68,13 @@ class TestCustodianParser < Test::Unit::TestCase
result = parser.parse_line( "# this is a comment" )
assert( result.nil? )
- # 1.b. Adding a test will return an array of test-objects.
+ # 1.b. Non-strings are an error
+ assert_raise ArgumentError do
+ result = parser.parse_line( nil )
+ end
+
+
+ # 1.c. Adding a test will return an array of test-objects.
result = parser.parse_line( "smtp.bytemark.co.uk must run smtp on 25 otherwise 'failure'." );
assert( !result.nil? )
assert( result.kind_of? Array )