diff options
| author | Steve Kemp <steve@steve.org.uk> | 2013-01-14 10:26:54 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2013-01-14 10:26:54 +0000 | 
| commit | 306df261909ea6e0988e95886c566f51ed059030 (patch) | |
| tree | c4d7da678b1f37a0023d98e743e923218ecb5512 /t | |
| parent | 0e08a0ed80bb4bc6792de4c9031ab55431d0d303 (diff) | |
  Test we get an error on non-strings.
Diffstat (limited to 't')
| -rwxr-xr-x | t/test-custodian-parser.rb | 8 | 
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 ) | 
