summaryrefslogtreecommitdiff
path: root/lib/custodian/testfactory.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-24 16:32:35 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-24 16:32:35 +0000
commitd97e9ce930c2b7563d861c3093e282903d98a1f0 (patch)
tree70281ef425a2ed938e092317d75cc94d7dffcc64 /lib/custodian/testfactory.rb
parent0949bf49c317e97c5adc74dd2bf6b83c32181905 (diff)
The argument to our class factories must be a non-nil string.
Diffstat (limited to 'lib/custodian/testfactory.rb')
-rw-r--r--lib/custodian/testfactory.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb
index f5e342d..ccfc89e 100644
--- a/lib/custodian/testfactory.rb
+++ b/lib/custodian/testfactory.rb
@@ -31,6 +31,10 @@ module Custodian
#
def self.create( line )
+
+ raise ArgumentError, "The type of test to create cannot be nil" if ( line.nil? )
+ raise ArgumentError, "The type of test to create must be a string" unless ( line.kind_of? String )
+
#
# If this is an obvious protocol test.
#