summaryrefslogtreecommitdiff
path: root/t
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
commit306df261909ea6e0988e95886c566f51ed059030 (patch)
treec4d7da678b1f37a0023d98e743e923218ecb5512 /t
parent0e08a0ed80bb4bc6792de4c9031ab55431d0d303 (diff)
Test we get an error on non-strings.
Diffstat (limited to 't')
-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 )